A nifty library for encoding mgjson documents from python.
Project description
python-mgjson
A nifty library for encoding mgjson documents from python.
Made possibly by the the works of JuanIrache . This library is a new partial implementation in python for generating Motion Graphics Json documents.
Static data properties of type int, boolean and ascii-string are supported. Dynamic data as time series are supported. These will be translated to timezone encoded time series.
installation
pip install mgjson
Usage
from mgjson import MgJSON
mgjson = MgJSON()
# static properties
mgjson.add_property("numberOfCats", 3)
mgjson.add_property("isItTrue", False)
mgjson.add_property("title", "A new adventure awaits!")
# dynamic data (time series)
mgjson.add_stream("temperature", [[0.0, 1.000], [2.59292, 0.777]])
print(mgjson.json)
License
MIT
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mgjson-0.1.0b1.tar.gz.
File metadata
- Download URL: mgjson-0.1.0b1.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.23.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e80e35496cc1d04c922901e1bfdf411e6c764fac7497d8f1f81e4e8cf82977e5
|
|
| MD5 |
ebe4f57ece2b0d27e7c09b10d8d9fcd6
|
|
| BLAKE2b-256 |
4bfb0abfeb4c9c7b641ef1f0081c6ee17a68a351b6b14443fef289917461b07b
|
File details
Details for the file mgjson-0.1.0b1-py3-none-any.whl.
File metadata
- Download URL: mgjson-0.1.0b1-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.23.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
559f5af76476c8e1035b6c1d6b84845482ac5a347d705ad0c8269fcdeb62b78e
|
|
| MD5 |
4a26f46e47682a0e9804c9bd38f85694
|
|
| BLAKE2b-256 |
2ac8efa538a36f9a801b646c768c3e1129d4dd7d1adcb71b465a09ce66ee5eb5
|