idl_parser
Description
OMG IDL file parser. This library just parse IDL files, and output intermidiate type objects.
Documentation
API reference and usage: https://idl-parser.readthedocs.io/
Example
"""
example for idl_parser package
"""
from idl_parser import parser
parser_ = parser.IDLParser()
idl_str = """
module my_module {
struct Time {
long sec;
long usec;
};
typedef sequence<double> DoubleSeq;
struct TimedDoubleSeq {
Time tm;
DoubleSeq data;
};
enum RETURN_VALUE {
RETURN_OK,
RETURN_FAILED,
};
interface DataGetter {
RETURN_VALUE getData(out TimedDoubleSeq data);
};
};
"""
global_module = parser_.load(idl_str)
my_module = global_module.module_by_name('my_module')
dataGetter = my_module.interface_by_name('DataGetter')
print('DataGetter interface')
for m in dataGetter.methods:
print('- method:')
print(' name:', m.name)
print(' returns:', m.returns.name)
print(' arguments:')
for a in m.arguments:
print(' name:', a.name)
print(' type:', a.type)
print(' direction:', a.direction)
doubleSeq = my_module.typedef_by_name('DoubleSeq')
print('typedef %s %s' % (doubleSeq.type.name, doubleSeq.name))
timedDoubleSeq = my_module.struct_by_name('TimedDoubleSeq')
print('TimedDoubleSeq')
for m in timedDoubleSeq.members:
print('- member:')
print(' name:', m.name)
print(' type:', m.type.name)
More examples are in the examples folder of the repository:
example.py: the smallest example: a module and an interface
argument_direction_example.py: directions of method arguments (in, out and inout)
struct_example.py: structs and their member types
enum_example.py: enums and their values
union_example.py: unions (discriminator kinds, case and default labels, member types)
annotation_example.py: IDL 4 annotations (@key, @range, …) and struct keys
scoped_name_example.py: same-named types in several modules (relative X, C::X and absolute ::B::X names)
https://github.com/sugarsweetrobotics/idl_parser/tree/main/examples
How to install
sudo pip install idl_parser
Copyright
author: Yuki Suga
copyright: Yuki Suga
contact: please open an issue on GitHub Issues
license: GPLv3 or later (GPL-3.0-or-later, see LICENSE)
Metadata
Release files for idl-parser 0.3.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 | Actions |
|---|---|---|---|---|
| idl_parser-0.3.2.tar.gz | 122.7 kB | With provenance | Details for idl_parser-0.3.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| idl_parser-0.3.2-py3-none-any.whl | Python 3 | none | any | Details for idl_parser-0.3.2-py3-none-any.whl |
Total release size: 184.6 kB
Release files / idl_parser-0.3.2.tar.gz
| Download URL | idl_parser-0.3.2.tar.gz |
|---|---|
| Size | 122.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
409044d45425701a9f21985643851fda3bf15d13f945331b4a57b30608378637
|
|
BLAKE2b-256 checksum How to use checksums |
171fb3c2bcae9f37cd1ff41dcd5eabc38654582dd45c00694b767809e93ea5d0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.
Transparency logRelease files / idl_parser-0.3.2-py3-none-any.whl
| Download URL | idl_parser-0.3.2-py3-none-any.whl |
|---|---|
| Size | 61.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7929b82756778d827d5f11e624a563ca6d1403b5e4f80eefcecc165ab883d73c
|
|
BLAKE2b-256 checksum How to use checksums |
47e17f75ae985caa32ffb8b12fbc40151011bcc537cbf00cd79d029b00b58135
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.
Transparency logSecurity for idl-parser 0.3.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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for idl_parser-0.3.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.
Transparency logA 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.