Boa
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:
$ pip install boa-str
Quickstart
>>> import boa
>>> my_str = 'Hello Boa'
>>> boa.constrict(my_str)
'hello_boa'
Examples
>>> import boa
>>> boa.constrict('toInfinityAndBeyond')
'to_infinity_and_beyond'
>>> boa.constrict('Welcome-to-planet-Earth!')
'welcome_to_planet_earth'
Tests
We use nose2 and coverage for unit tests.
Install with test requirements:
$ pip install boa-str[test]
Then run:
$ invoke test
Style
$ invoke lint
Contribute
Clone the repo, then install with dev requirements which also includes test requirements:
$ git clone https://github.com/astronomerio/boa/
$ cd boa
$ pip install .[dev]
🐍️🐍️🐍️
Metadata
Release files for boa-str 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| boa-str-1.1.0.tar.gz | 2.7 kB | Without provenance | Details for boa-str-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| boa_str-1.1.0-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for boa_str-1.1.0-py2.py3-none-any.whl |
Total release size: 7.0 kB
Release files / boa-str-1.1.0.tar.gz
| Download URL | boa-str-1.1.0.tar.gz |
|---|---|
| Size | 2.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f37a60cb8cc0c51e77293a4b390b8e7712056dccf180fea59e687ee2d7f34805
|
|
BLAKE2b-256 checksum How to use checksums |
9c05cf34751f3c56e35f2a7959c79cc170e5641c67f805e0211912a3c429dad4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / boa_str-1.1.0-py2.py3-none-any.whl
| Download URL | boa_str-1.1.0-py2.py3-none-any.whl |
|---|---|
| Size | 4.3 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
8ca60c028cf3576080b3cfdbd9554a16c2086540fc7369a68559a135893c154f
|
|
BLAKE2b-256 checksum How to use checksums |
2a75741f22c5cb6314dffa906e7b58701ad558fa379e522013cbcb49191bf6f4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for boa-str 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.