About The Project
This is the Python SDK of the Flythings Connector Project.
Build
pip install flythings-dataspace-sdk
Content
- Auth: This module includes all the authentication logic
- Connector: This module includes all the clients and services that interface with Flythings Connector
- Model: This module contains all the required EDC entities
Requirements
| Tool | Version |
|---|---|
| Python | 3.9+ |
Dependencies
Runtime
| Package | Version | Description |
|---|---|---|
httpx |
>=0.27 |
HTTP client with async support |
Development
| Package | Version | Description |
|---|---|---|
pytest |
>=8.0 |
Test framework |
Authentication
Authentication is configured on the DataspaceClient, which is the central entry point for the SDK. It supports two authentication strategies: static token and credentials-based.
Note: Static tokens may expire during long-running operations. If your use case requires uninterrupted access, prefer credentials-based authentication, which handles token renewal automatically.
Static Token
from flythings_dataspace_sdk import DataspaceClient, TokenAuth
auth = TokenAuth(token="my-token")
client = DataspaceClient(
base_url="https://sdk.api.url",
auth=auth,
)
Credentials (Recommended)
from flythings_dataspace_sdk import DataspaceClient, BasicLoginAuth
auth = BasicLoginAuth(
auth_base_url="https://sdk.auth.url",
username="my-username",
password="my-password",
)
client = DataspaceClient(
base_url="https://sdk.api.url",
auth=auth,
)
When using BasicLoginAuth, the client acquires and refreshes tokens automatically, ensuring requests remain authenticated without manual intervention.
An optional timeout (in seconds) can be passed to DataspaceClient:
from flythings_dataspace_sdk import DataspaceClient, TokenAuth
auth = TokenAuth(token="my-token")
client = DataspaceClient(base_url="my-base-url", auth=auth, timeout=10)
Environment Variables (Recommended for Production)
The SDK can be configured entirely via environment variables using the from_env() factory:
from flythings_dataspace_sdk import DataspaceClient
client = DataspaceClient.from_env()
The following variables are read automatically:
| Variable | Description |
|---|---|
DATASPACE_BASE_URL |
The SDK API base URL |
DATASPACE_AUTH_BASE_URL |
The authentication service URL |
DATASPACE_USERNAME |
Username for credentials-based auth |
DATASPACE_PASSWORD |
Password for credentials-based auth |
Usage
The DataspaceClient exposes all clients and services as attributes — no separate instantiation is needed.
DownloadService
download_service downloads the contents of an asset identified by a contract agreement. The response is returned as bytes.
Minimal usage — only agreement_id is required:
from flythings_dataspace_sdk import DataspaceClient, DownloadRequest
client = DataspaceClient.from_env()
file = client.download_service.download(
DownloadRequest(agreement_id="a3fe7fee-b359-477c-ab9d-0f9671601bf4")
)
Note: You can retrieve the
agreement_idfrom the web interface. Navigate to Contracts, select a contract for your desired asset, click View Details, and locate the Agreement ID in the Agreement section.
Full configuration — the following shows all available parameters with their defaults:
from flythings_dataspace_sdk import DataspaceClient, DownloadRequest
client = DataspaceClient.from_env()
file = client.download_service.download(
DownloadRequest(
agreement_id="a3fe7fee-b359-477c-ab9d-0f9671601bf4",
transfer_type="HttpData-PUSH",
data_address_type="HttpProxy",
protocol="dataspace-protocol-http",
context=["https://w3id.org/edc/connector/management/v0.0.1"],
)
)
| Parameter | Default | Description |
|---|---|---|
transfer_type |
HttpData-PUSH |
The transfer mechanism used to move the data |
data_address_type |
HttpProxy |
Specifies how the asset's data address is resolved |
protocol |
dataspace-protocol-http |
The dataspace protocol used for the transfer negotiation |
context |
EDC management v0.0.1 | JSON-LD @context — override when using a custom or domain-specific ontology |
The default configuration assumes an HTTP-based transfer. For non-HTTP assets (e.g., S3, Azure Blob), adjust transfer_type, data_address_type, and protocol accordingly.
Metadata
Release files for flythings-dataspace-sdk 1.0.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 |
|---|---|---|---|---|
| flythings_dataspace_sdk-1.0.2.tar.gz | 20.9 kB | Without provenance | Details for flythings_dataspace_sdk-1.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| flythings_dataspace_sdk-1.0.2-py3-none-any.whl | Python 3 | none | any | Details for flythings_dataspace_sdk-1.0.2-py3-none-any.whl |
Total release size: 50.5 kB
Release files / flythings_dataspace_sdk-1.0.2.tar.gz
| Download URL | flythings_dataspace_sdk-1.0.2.tar.gz |
|---|---|
| Size | 20.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
969ac3ced7deed3d93490d905f09748581dc46c9c977a571d2ea6022894d6837
|
|
BLAKE2b-256 checksum How to use checksums |
1ef404455223b5c456e76db3c0995dd41f9bf3a62a2d826c585a96996a469a4e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Release files / flythings_dataspace_sdk-1.0.2-py3-none-any.whl
| Download URL | flythings_dataspace_sdk-1.0.2-py3-none-any.whl |
|---|---|
| Size | 29.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0209e8755dada26e20e4551c963e471321cc90a1d7f7d74fd2452f79e38345eb
|
|
BLAKE2b-256 checksum How to use checksums |
fcd3296cdeb19fb793533170fc205f58a2baceb791a00f307f8adfb5e33e24c8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Security for flythings-dataspace-sdk 1.0.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.