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


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

jpsy-0.1.2-py2.py3-none-any.whl (3.2 kB view details)

Uploaded Python 2Python 3

File details

Details for the file jpsy-0.1.2-py2.py3-none-any.whl.

File metadata

  • Download URL: jpsy-0.1.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 3.2 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.1.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.5

File hashes

Hashes for jpsy-0.1.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 702d64e25e4331f7d3606f985ce5e6552280eb8639b0fd7877eeb96f80abb0b4
MD5 219d94c7a28b9b97078bbfa44c870ee7
BLAKE2b-256 c09adf7021b8212ff318a9e80c8cd167f974ff8c36f46148bfe4e1048cb799eb

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