json2daisy
Utility for converting JSON board definitions into valid, libDaisy compatible C++ board support files for the Daisy platform.
Install
Note that this module is not intended as a standalone application at this time. You should not need to install it manually for most use cases.
You can install this package with pip:
python -m pip install json2daisy
If you'd like to build the package and install locally, you'll need the build package:
python -m pip install build
Once that's set up, navigate to the root directory of json2daisy and run:
python3 -m build
python3 -m pip install dist/json2daisy-0.2.0.tar.gz
If pip complains about a missing file, make sure you've entered the correct version number in the archive path.
Usage
This package can be used as a standalone program on the command line or as an imported module.
On the command line:
python -m json2daisy path/to/board_description.json
As a module:
import json2daisy
# If you want to generate from an Electrosmith board:
header_string, board_name, component_info, component_aliases = json2daisy.generate_header_from_board('field')
# If you're supplying custom JSON
header_string, board_name, component_info, component_aliases = json2daisy.generate_header_from_file('path/to/board_description.json')
As you can see, the two functions above will return a number of supplementary objects in addition to the header string. These provide detailed information for how to interact with the generated header. The component_info dictionary provides getters and setters for I/O, and the component_aliases dictionary provides valid aliases for everything in component_info.
For examples of how to structure the board description, take a look at the JSON files in src/json2daisy/resources.
Metadata
Release files for json2daisy 0.4.2
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 | |
|---|---|---|---|---|
| json2daisy-0.4.2.tar.gz | 21.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| json2daisy-0.4.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 44.6 kB
Release files / json2daisy-0.4.2.tar.gz
| Download URL | json2daisy-0.4.2.tar.gz |
|---|---|
| Size | 21.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4a568eb503bd203c12fc17594a27fc4cc6b2eede8590ed150cb9cd8be3f4e6f8
|
|
BLAKE2b-256 checksum How to use checksums |
e1a15eec0c1922f6958d057e9c9cde6590582dcf7b8c9dbea0ec70af1cac4c37
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.9.0 pkginfo/1.8.2 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10
|
Release files / json2daisy-0.4.2-py3-none-any.whl
| Download URL | json2daisy-0.4.2-py3-none-any.whl |
|---|---|
| Size | 23.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f2ba86735ade2fd76e12885ed5b6b553a3efcda05a71a052e9006f508c6f8f89
|
|
BLAKE2b-256 checksum How to use checksums |
5fa9bdc39fdd4bc71c282d1379c39863cec382005c88b30e4a7f60474486e58d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.9.0 pkginfo/1.8.2 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10
|
Security for json2daisy 0.4.2
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.