https://github.com/kevinheavey/pyheck
Python bindings for heck, the Rust case conversion library
https://github.com/kevinheavey/pyheck
maturin pyo3 python rust string-manipulation
Last synced: 4 months ago
JSON representation
Python bindings for heck, the Rust case conversion library
- Host: GitHub
- URL: https://github.com/kevinheavey/pyheck
- Owner: kevinheavey
- License: mit
- Created: 2022-01-12T10:17:25.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-07-18T08:56:15.000Z (almost 3 years ago)
- Last Synced: 2024-12-28T09:13:58.023Z (4 months ago)
- Topics: maturin, pyo3, python, rust, string-manipulation
- Language: Rust
- Homepage: https://kevinheavey.github.io/pyheck/
- Size: 2.82 MB
- Stars: 48
- Watchers: 2
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# pyheck
PyHeck is a case conversion library (for converting strings to snake_case, camelCase etc). It is a thin wrapper around the Rust library [heck](https://github.com/withoutboats/heck).
[Read the documentation.](https://kevinheavey.github.io/pyheck/)
## Installation
```
pip install pyheck
```Note: requires Python >= 3.7.
## Example
```python
>>> from pyheck import snake
>>> snake("We carry a new world here, in our hearts.")
'we_carry_a_new_world_here_in_our_hearts'```
## Development
### Setup
1. Install [poetry](https://python-poetry.org/)
2. Install dev dependencies:```
poetry install
```3. Activate the poetry shell:
```sh
poetry shell
```### Testing
1. Run `maturin develop` to compile the Rust code.
2. Run `make fmt`, `make lint`, and `make test`.