Lightweight library written in idiomatic Python (no regular expressions), that aims to translate string into various typography conventions.
Project description
Typocase
Lightweight library written in idiomatic Python (no regular expressions), that aims to translate string into various typography conventions.
How it works
- Accept any string as input.
- Detect substrings based on special chars or uppercase letters as separators.
- Join substrings based on the typography convention selected:
- snake case
- pascal case
- camel case
- kebab case
- dot case
- path case
- ...
Install
Usage
>>> from typocase import TypoCase
>>> TypoCase("abc def ghi").snake_case()
'abc_def_ghi'
>>> TypoCase("abc def ghi").camel_case()
'abcDefGhi'
>>> TypoCase("abc def ghi").kebab_case()
'abc-def-ghi'
License
This software is released under the MIT LICENSE.
Author
Martin Tovmassian
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
typocase-0.1.tar.gz
(371.9 kB
view hashes)
Built Distribution
Close
Hashes for typocase-0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb163b46211363dfacb6f8bcb3567fdc5c0db6df4922ee3af961733bca6bd19d |
|
MD5 | f781a5692863ceeeedaf78c050827968 |
|
BLAKE2b-256 | 1663e2b7a7ba841f6e3cd4a72c23b1d3d813f85fa3296d688edf57af3ed983f1 |