Skip to main content

Enforcing Language Naming Conventions

Project description

jpsy

Enforcing Language Naming Conventions

What is it?

jpsy (pronounced like Gypsy), is a tool for naming convention purists, who don't like seeing other languages' naming conventions messing around their code's look and feel.

It comes in handy when your python code handles JSONs created in a JavaScript component, or just when you have people in your project who don't play by the book when it comes to naming conventions.

Installation

pip install jpsy

or

pip install -e git+git://github.com/RomAviad/jpsy.git

What's with the name?

Obviously, it's a mash-up between JS and Py(thon).

Usage Example

from jpsy import pythonify, jsify

sample = {"abc_pep8": 123, "dictKey": {"PascalCase": "whatever", "camelCaseLongKEY": "woot"}}

pythonified = pythonify(sample)
print(pythonified)
# >>> {'abc_pep8': 123, 'dict_key': {'pascal_case': 'whatever', 'camel_case_long_key': 'woot'}}

jsified = jsify(sample)
print(jsified)
# >>> {'abcPep8': 123, 'dictKey': {'PascalCase': 'whatever', 'camelCaseLongKEY': 'woot'}}


jsified_python = jsify(pythonified)
print(jsified_python)
# >>> {'abcPep8': 123, 'dictKey': {'pascalCase': 'whatever', 'camelCaseLongKey': 'woot'}}

Project details


Release history Release notifications

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for jpsy, version 0.1.2
Filename, size File type Python version Upload date Hashes
Filename, size jpsy-0.1.2-py2.py3-none-any.whl (3.2 kB) File type Wheel Python version py2.py3 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