An attempt to recreate the way json behaves in Javascript, but in Python
Project description
Classy-Json
An attempt at recreating the way json works in JavaScript, but in the Python programming language.
Setup / Install
Using pip:
python3 -m pip install classy-json
Manually:
- Clone the repository
git clone https://github.com/Iapetus-11/classy-json.git
- cd into the directory
cd classy-json
- Run setup.py
python3 setup.py build install
How do I use classy-json?
- All functions from the built in json module are supported! json module docs
- The only difference is that you can now access dictionaries via
dict.key
as well asdict['key']
- Note: using
dict.key
is about 2-2.5x slower [in some cases] than usingdict['key']
, however, usingdict['key']
is just as fast as in normal Python dictionaries. - You can also use
classyjson.classify(Union[dict, list, actually anything])
to turn a preexisting dictionary or list into a ClassyDict or ClassyList object
Contribution
- Fork the repository
- Make any changes
- Submit a pull request
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
classy-json-2.0.3.tar.gz
(2.4 kB
view hashes)
Built Distribution
Close
Hashes for classy_json-2.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1c0ea615e76636837dfdace7593bc833f64a72c31469dfb8df4263af503063a7 |
|
MD5 | 0635751ebfb9e25565ebb5cd5657c547 |
|
BLAKE2b-256 | dc22a8f685b11e3f76c686f3ace9da90b26cbbbfac8f417f80aa32eb998ef9c9 |