boa-str-1.1.0
توضیحات
Convert strings to snakecase
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | boa-str-1.1.0 |
| نام | boa-str |
| نسخه کتابخانه | 1.1.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Astronomer |
| ایمیل نویسنده | taylor@astronomer.io |
| آدرس صفحه اصلی | https://github.com/astronomerio/boa |
| آدرس اینترنتی | https://pypi.org/project/boa-str/ |
| مجوز | MIT License |
Boa
===
.. image:: https://img.shields.io/pypi/v/boa-str.svg
:target: https://pypi.python.org/pypi/boa-str
:alt: PyPI
.. image:: https://img.shields.io/circleci/project/github/astronomerio/boa.svg
:target: https://circleci.com/gh/astronomerio/boa
:alt: CircleCI
.. image:: https://codecov.io/gh/astronomerio/boa/branch/master/graph/badge.svg
:target: https://codecov.io/gh/astronomerio/boa
:alt: Codecov
Boa is a Python package for normalizing and converting strings to snakecase.
For example, it translates the user-defined event ``'User Buys Item'`` to ``'user_buys_item'`` which can then be used in a file path in S3, or as the name of a schema or table in Redshift.
It also handles the more complex cases such as stripping punctuation and converting words from camelCase or PascalCase to snake_case (see examples below).
Installation
------------
Install in your virtual environment:
.. code-block:: console
$ pip install boa-str
Quickstart
----------
.. code-block:: python
>>> import boa
>>> my_str = 'Hello Boa'
>>> boa.constrict(my_str)
'hello_boa'
Examples
--------
.. code-block:: python
>>> import boa
>>> boa.constrict('toInfinityAndBeyond')
'to_infinity_and_beyond'
>>> boa.constrict('Welcome-to-planet-Earth!')
'welcome_to_planet_earth'
Tests
-----
We use `nose2 <https://pypi.python.org/pypi/nose2>`_ and `coverage <https://pypi.python.org/pypi/coverage>`_ for unit tests.
Install with test requirements:
.. code-block:: console
$ pip install boa-str[test]
Then run:
.. code-block:: console
$ invoke test
Style
-----
.. code-block:: console
$ invoke lint
Contribute
----------
Clone the repo, then install with dev requirements which also includes test requirements:
.. code-block:: console
$ git clone https://github.com/astronomerio/boa/
$ cd boa
$ pip install .[dev]
🐍️🐍️🐍️
نیازمندی
| مقدار | نام |
|---|---|
| xtr | codecov; |
| xtr | cov-core; |
| xtr | nose2; |
| xtr | flake8; |
| xtr | invoke; |
| xtr | pycodestyle; |
| xtr | twine; |
| xtr | codecov; |
| xtr | cov-core; |
| xtr | nose2; |
نحوه نصب
نصب پکیج whl boa-str-1.1.0:
pip install boa-str-1.1.0.whl
نصب پکیج tar.gz boa-str-1.1.0:
pip install boa-str-1.1.0.tar.gz