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.

Files for typocase, version 0.1
Filename, size File type Python version Upload date Hashes
Filename, size typocase-0.1-py2.py3-none-any.whl (6.0 kB) File type Wheel Python version py2.py3 Upload date Hashes View hashes
Filename, size typocase-0.1.tar.gz (371.9 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page