Cyphal DSDL processing frontend
Project description
PyDSDL
PyDSDL is a Cyphal DSDL compiler front-end implemented in Python. It accepts a DSDL namespace at the input and produces a well-annotated abstract syntax tree (AST) at the output, evaluating all constant expressions in the process. All DSDL features defined in the Cyphal Specification are supported. The library should, in theory, work on any platform and with any Python implementation.
Read the docs at pydsdl.readthedocs.io.
import pydsdl
try:
types = pydsdl.read_namespace(target_directory, lookup_directories)
except pydsdl.InvalidDefinitionError as ex:
print(f'{ex.path}:{ex.line}: Invalid DSDL: {ex.text}', file=sys.stderr)
exit(1)
else:
for t in types:
print(t) # Process the type -- generate code, analyze, etc.
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
pydsdl-1.22.0.tar.gz
(98.7 kB
view details)
Built Distribution
pydsdl-1.22.0-py3-none-any.whl
(115.0 kB
view details)
File details
Details for the file pydsdl-1.22.0.tar.gz
.
File metadata
- Download URL: pydsdl-1.22.0.tar.gz
- Upload date:
- Size: 98.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c8ce6b1d4aed4335329f2f0ac3439cda9df5ee96eda6b9fd6f3d76818bb33b72 |
|
MD5 | 41bc086142b2f8b4757d23aaa2b94b9e |
|
BLAKE2b-256 | c21342488e7e44866ab732b22c305908645a0ee16251d5dd5a1014ef2fc270c4 |
File details
Details for the file pydsdl-1.22.0-py3-none-any.whl
.
File metadata
- Download URL: pydsdl-1.22.0-py3-none-any.whl
- Upload date:
- Size: 115.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4bfb0693ed08a9783a6c5e9a5a14aee513e030f981898d561e5568f84c9179ca |
|
MD5 | 4b2ba6acda38b81bfd8b72239b4f4f13 |
|
BLAKE2b-256 | 94276918dc39731daaba8db06dc6c14b01b44be4bf1f5ee3d7eb28d2fedf2719 |