duro_rest
An API client for the Duro REST API.
Installation
Installing from PyPi
pip install duro_rest
Installing from conda-forge
TBD
Examples
The Duro client is a very minimal API client for reading data from the Duro v1 REST API. It does not define classes for each object type and instead returns plain dictionaries and lists.
Base Client
from duro_rest import Client
# Create a new client, providing your API key. By default clients will make calls to the public REST
# API, but the endpoint base can be overridden if needed
client = Client("your-api-key")
# Fetch a component by its Duro assigned id (as opposed to the CPN)
component = client.component("component-id")
# Fetch a list of all components in Duro
components = client.components()
# Fetch a list of all components in Duro filtered by status
components = client.components(status = "OBSOLETE")
BOM Client
The Duro API does not support pulling BOMs directly. The BOM Client is here to make that experience a little easier.
from duro_rest import BOMClient
# Create a new bom client for fetching full BOMs (either nested or flattened). It accepts the same
# arguments as the base client
client = Client("your-api-key")
# Get a nested BOM starting from a product
nested_product_bom = client.product_bom("product-id")
# Get a nested BOM starting from a component
nested_component_bom = client.component("component-id")
# Convert the nested BOM into flattened BOM
indented_product_bom = nested_product_bom.idented()
# Flattening will collapse rows for the same components together
flattened_product_bom = indented_product_bom.flatten()
Metadata
Release files for duro-rest 0.0.18
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 |
|---|---|---|---|---|
| duro_rest-0.0.18.tar.gz | 11.8 kB | Without provenance | Details for duro_rest-0.0.18.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| duro_rest-0.0.18-py3-none-any.whl | Python 3 | none | any | Details for duro_rest-0.0.18-py3-none-any.whl |
Total release size: 24.9 kB
Release files / duro_rest-0.0.18.tar.gz
| Download URL | duro_rest-0.0.18.tar.gz |
|---|---|
| Size | 11.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3a28589c027d472fc1fa9b88aeb19686e15ce68b882a0e2e4726a412ccb0be0e
|
|
BLAKE2b-256 checksum How to use checksums |
9d7a61fd4c3710a54400bffe55fa901c2e0cb7e158e324a03f368b843b371448
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.2 CPython/3.11.4 Linux/6.2.0-39-generic
|
Release files / duro_rest-0.0.18-py3-none-any.whl
| Download URL | duro_rest-0.0.18-py3-none-any.whl |
|---|---|
| Size | 13.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6a38675b2664e66b79be1a27f035980d6484b9c231b6b7f98ccefe5c58c114ea
|
|
BLAKE2b-256 checksum How to use checksums |
919780a2e2f167da56765038f6429a5a67e23aee36a04d053400611d47c4f8e2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.2 CPython/3.11.4 Linux/6.2.0-39-generic
|
Security for duro-rest 0.0.18
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.