JSON-able data types
This library provides and abstract base class JSONable which enables easy definition of trivially JSON-able python objects.
Installation: pip install jsonable
- Example:
>>> import jsonable >>> >>> >>> class Fruit(jsonable.Type): ... __slots__ = ('type', 'weight') ... ... def initialize(self, type, weight): ... self.type = str(type) ... self.weight = float(weight) ... >>> class Pie(jsonable.Type): ... __slots__ = ('fruit',) ... ... def initialize(self, fruit): ... self.fruit = [Fruit(f) for f in fruit] ... ... >>> pie = Pie([Fruit('apple', 10.3), Fruit('cherry', 2)]) >>> >>> doc = pie.to_json() >>> doc {'fruit': [{'weight': 10.3, 'type': 'apple'}, {'weight': 2.0, 'type': 'cherry'}]} >>> >>> pie == Pie(doc) True
Metadata
Release files for jsonable 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| jsonable-0.3.1.tar.gz | 5.5 kB | Without provenance | Details for jsonable-0.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| jsonable-0.3.1-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for jsonable-0.3.1-py2.py3-none-any.whl |
Total release size: 16.6 kB
Release files / jsonable-0.3.1.tar.gz
| Download URL | jsonable-0.3.1.tar.gz |
|---|---|
| Size | 5.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
137b676e8e5819fa58518678c3d1f5463cab7e8466f69b3641cbc438042eaee4
|
|
BLAKE2b-256 checksum How to use checksums |
47f1e02151747f823dc9f13900f19d9fd61cc6aa01a5e90b3f8c2b4131bd619c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / jsonable-0.3.1-py2.py3-none-any.whl
| Download URL | jsonable-0.3.1-py2.py3-none-any.whl |
|---|---|
| Size | 11.1 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
f7754dd27b4734e42e7f8a61c2336bc98082f715e31e29a061a95843b102dc3a
|
|
BLAKE2b-256 checksum How to use checksums |
0e55c6bcb4ec7f93bf8f98b57d7e185cf5ee02b52473ed84d5611277f710cdcc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for jsonable 0.3.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.