Python SDK skeleton for Tachyus DataCore API
Project description
datacore-sdk-python
Python SDK skeleton for Tachyus DataCore API.
This package provides a clean, extensible structure for wrapping DataCore API operations. It uses a thin HTTP client, clear sub-clients for endpoints, typed models, and room for higher-level orchestration methods (e.g., an SDK method that performs multiple API calls under the hood).
Quick start
Install (editable for local development):
pip install -e .
Basic usage:
from datacore_sdk import DataCoreClient
client = DataCoreClient(
base_url="https://api.datacore.example.com", # replace with actual base URL
api_key="YOUR_API_KEY",
)
# Low-level: call a specific endpoint via sub-client
project = client.projects.create(name="My Project", description="Demo")
print(project)
# High-level orchestration: one call that performs multiple underlying API calls
# (placeholder implementation; adapt to your business flow)
result = client.create_dune_project(name="My Dune Project")
print(result)
Run the CLI demo program
You can also try the SDK via a small CLI that exercises the DatacoreProjects endpoints.
- Set your environment variables (or pass flags on the command):
set DATACORE_BASE_URL=https://your-api-base
set DATACORE_API_KEY=your-token
- Install and run the demo:
pip install -e .
# Show help
datacore-demo --help
# List projects (with optional filters and pagination)
datacore-demo list --page-number 0 --page-size 50 --filter status=active;0
# Create a project (basic inline flags)
datacore-demo create --name "My DC Project" --description "Demo"
# Create a project with all properties inline (no JSON file needed)
# Note: boolean flags accept true/false/1/0/yes/no/on/off (case-insensitive)
datacore-demo create \
--name "Field Ops" \
--description "Created from CLI" \
--status active \
--active true \
--disabled false \
--created-by alice@example.com \
--modified-by alice@example.com \
--create-date 2025-12-16T15:41:00Z \
--modified-date 2025-12-16T15:41:00Z \
--geoposition "POINT(0 0)" \
--crs "EPSG:4326" \
--message "initial import" \
--attributes "{\"priority\":\"high\"}"
# Create/update from full DTO JSON file (takes precedence over inline flags)
datacore-demo create --json path\to\project.json
datacore-demo update --json path\to\project.json
# Delete in bulk
datacore-demo delete --ids id-1 id-2
Notes:
- The create command supports all DatacoreProject DTO fields as flags:
--created-by, --create-date, --modified-date, --modified-by, --disabled,
--id, --name, --description, --geoposition, --crs, --status, --message,
--attributes, --active.
- When --json is provided, its contents are used and any inline flags are ignored.
- Dates should be ISO 8601 strings (e.g., 2025-12-16T15:41:00Z).
Project layout
.
├─ pyproject.toml
├─ src/
│ └─ datacore_sdk/
│ ├─ __init__.py
│ ├─ client.py
│ ├─ http.py
│ ├─ exceptions.py
│ ├─ types.py
│ └─ endpoints/
│ └─ projects.py
└─ tests/
└─ test_smoke.py
Development
Run tests:
pytest -q
Format and lint (optional, if you later add tools like ruff/black):
ruff check .
black .
Notes
- This is a skeleton. Replace placeholder URLs, models, and endpoint paths with the real DataCore API details.
- Add authentication schemes beyond API key as needed (OAuth2, etc.).
- Consider retry/backoff, pagination helpers, and streaming when implementing real endpoints.
- The demo uses
DATACORE_BASE_URLandDATACORE_API_KEY(or--base-url/--api-keyflags) and prints JSON responses for quick testing.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file datacore_sdk_python-0.1.0.tar.gz.
File metadata
- Download URL: datacore_sdk_python-0.1.0.tar.gz
- Upload date:
- Size: 10.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e5780454e5f5152b1b2d500bae447667c339f928e420d21be6f9065b2d772d8f
|
|
| MD5 |
5a2e4e386f7eac3ed1f737e1f47b0238
|
|
| BLAKE2b-256 |
88d00fea878474dff3fd37a38b1578015890710f2cb40a0702f11e893a280039
|
File details
Details for the file datacore_sdk_python-0.1.0-py3-none-any.whl.
File metadata
- Download URL: datacore_sdk_python-0.1.0-py3-none-any.whl
- Upload date:
- Size: 11.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
135c99c90d289572e8150b72b4390d1e9e0ce5dfa713f5a43727c9790cd7c0f2
|
|
| MD5 |
b89e7e9385c3d4cb0c9cf37d636aced2
|
|
| BLAKE2b-256 |
3fe52cfc9ab1c09f3f64f270b153727a3bdeadd8ed463b6990fb1d57d2a20bfd
|