Skip to main content

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


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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

typocase-0.1-py2.py3-none-any.whl (6.0 kB view details)

Uploaded Python 2Python 3

File details

Details for the file typocase-0.1.tar.gz.

File metadata

  • Download URL: typocase-0.1.tar.gz
  • Upload date:
  • Size: 371.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.4

File hashes

Hashes for typocase-0.1.tar.gz
Algorithm Hash digest
SHA256 fd97409c9559aa2ec5beb13555582aa0171e9faf9f188b4fcd550e43cc21231d
MD5 41895c79714828cae8d64093bd526cbe
BLAKE2b-256 6ec5f46c4653a5fdd136c11b35fd56e5e008fad59a3210a1574665dc1fce17e6

See more details on using hashes here.

File details

Details for the file typocase-0.1-py2.py3-none-any.whl.

File metadata

  • Download URL: typocase-0.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.4

File hashes

Hashes for typocase-0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 bb163b46211363dfacb6f8bcb3567fdc5c0db6df4922ee3af961733bca6bd19d
MD5 f781a5692863ceeeedaf78c050827968
BLAKE2b-256 1663e2b7a7ba841f6e3cd4a72c23b1d3d813f85fa3296d688edf57af3ed983f1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page