DataGraphs Python Client
Python client library for DataGraphs.
Installation
uv add pydatagraphs
or
pip install pydatagraphs
Quick starts
from datagraphs import Client
# Connect to a project
client = Client(
project_name="my-project",
api_key="your-api-key",
)
# Check the API is reachable
print(client.status())
# Retrieve all entities of a given type
products = client.get("Product")
# Query with filters and pagination
results = client.query(q="Acme", page_size=50)
from datagraphs import Client
# Connect to a project
client = Client(
project_name="my-project",
api_key="your-api-key",
client_id="your-client-id",
client_secret="your-client-secret"
)
# Read the project schema and dataset configurations
schema = client.get_schema()
datasets = client.get_datasets()
# Update the project schema and dataset configurations
client.apply_schema(schema)
client.apply_datasets(datasets)
import json
from datagraphs import Client, Gateway, Schema, Dataset
# Connect to a project
client = Client(
project_name="my-project",
api_key="your-api-key",
client_id="your-client-id",
client_secret="your-client-secret"
)
gateway = Gateway(client)
# Load / dump data via the Gateway
gateway.dump_data("./backup")
gateway.load_data(from_dir_path="./backup")
# Load / dump project via the Gateway
schema_output_path = "./schemas/"
datasets_output_path = "./datasets/"
gateway.dump_project(schema_output_path, datasets_output_path)
with open("./schemas/myproject-model-v1.0.json") as f:
schema_data = json.load(f)
with open("./datasets/myproject-datasets-v1.0.json") as f:
datasets_data = json.load(f)
schema = Schema.create_from(schema_data)
datasets = [Dataset.create_from(d) for d in datasets_data]
gateway.load_project(schema, datasets)
For full API documentation, please see here
Authentication
For read-only access, an API key is sufficient. For write operations, supply OAuth credentials as well:
client = Client(
project_name="my-project",
api_key="your-api-key",
client_id="your-client-id",
client_secret="your-client-secret",
)
Key classes
| Class | Description |
|---|---|
Client |
HTTP client for the DataGraphs REST API |
Gateway |
Higher-level wrapper class for deploying projects and bulk export/load of data |
Schema |
In-memory representation of a project's domain model |
Dataset |
Represents a dataset within a project |
Development
Install uv, then:
uv sync # create virtualenv & install deps
uv run pytest tests -v # unit tests
uv run pytest tests_integration -v # integration tests
uv run pytest tests -v --capture=tee-sys # capturing stdout/stderr
uv run pytest --cov=src --cov-report=html # coverage report
uvx ruff check . # lint
License
MIT — Copyright (c) 2026 Data Language
Metadata
Release files for pydatagraphs 0.6.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 | |
|---|---|---|---|---|
| pydatagraphs-0.6.2.tar.gz | 55.6 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pydatagraphs-0.6.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 115.8 kB
Release files / pydatagraphs-0.6.2.tar.gz
| Download URL | pydatagraphs-0.6.2.tar.gz |
|---|---|
| Size | 55.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
46c3e7389d5359f59e6a9cdfe81482b8fa85d12e593c42d9235eca725de2bbff
|
|
BLAKE2b-256 checksum How to use checksums |
052ddca1057f3febc00749f104f23222d52b924ba37bc189a6c23303f4daa141
|
| 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 Aug 10, 2026.
Transparency logRelease files / pydatagraphs-0.6.2-py3-none-any.whl
| Download URL | pydatagraphs-0.6.2-py3-none-any.whl |
|---|---|
| Size | 60.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f93917e355837eaf41e37a722be42f418a933b3a024c00b4d57136438f2899c8
|
|
BLAKE2b-256 checksum How to use checksums |
32a20a509a160983a5ea94df38e03fe0b4eaa72d8d53766367f2f8c3757de8a8
|
| 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 Aug 10, 2026.
Transparency logSecurity for pydatagraphs 0.6.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 pydatagraphs-0.6.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 Aug 10, 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.