Atlas4D Python SDK
Simple Python client for Atlas4D spatiotemporal platform.
Installation
pip install atlas4d
Requires Python 3.9+
Quick Start
Sync Client
from atlas4d import Client
# Connect to Atlas4D
client = Client(host="localhost", port=8090)
# Check health
print(client.health())
# Ask documentation questions (RAG)
answer = client.ask("How do I create a module?")
print(answer.text)
print(f"Sources: {len(answer.sources)}")
# Get observations
obs = client.observations.list(
lat=42.5,
lon=27.5,
radius_km=10,
hours=24
)
print(f"Found {len(obs)} observations")
# Get anomalies
anomalies = client.anomalies.list(hours=24)
Async Client
import asyncio
from atlas4d import AsyncClient
async def main():
async with AsyncClient() as client:
# Ask documentation questions
answer = await client.ask("How do I deploy Atlas4D?")
print(answer.text)
# Get observations
obs = await client.observations.list(limit=100)
print(f"Found {len(obs)} observations")
asyncio.run(main())
Configuration
# Using environment variables
# ATLAS4D_HOST=myserver.com
# ATLAS4D_PORT=8090
client = Client() # Uses env vars
# Or explicit configuration
client = Client(host="myserver.com", port=8090, timeout=60)
RAG (Documentation Q&A)
Ask questions about Atlas4D documentation in natural language:
# English
answer = client.ask("What is Atlas4D Core?")
# Bulgarian
answer = client.ask("Какво е Atlas4D?", lang="bg")
# With more sources
answer = client.ask("How to deploy?", top_k=5)
# Access sources
for source in answer.sources:
print(f"- {source['doc_id']}: {source['similarity']:.0%}")
API Reference
Client / AsyncClient
| Method | Description |
|---|---|
health() |
Check API health |
stats() |
Get platform statistics |
ask(question, top_k=3, lang="en") |
Ask documentation questions |
Observations API
| Method | Description |
|---|---|
list(lat, lon, radius_km, hours, limit) |
List observations |
geojson(limit) |
Get as GeoJSON |
Anomalies API
| Method | Description |
|---|---|
list(hours, limit) |
List anomalies |
Changelog
See CHANGELOG.md for version history.
Links
License
Apache 2.0
Metadata
Release files for atlas4d 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| atlas4d-0.3.0.tar.gz | 4.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| atlas4d-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.0 kB
Release files / atlas4d-0.3.0.tar.gz
| Download URL | atlas4d-0.3.0.tar.gz |
|---|---|
| Size | 4.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f8428f0ae911c9be40d4040fa78ea3f167e06ab31a218b79597c36c78750f26c
|
|
BLAKE2b-256 checksum How to use checksums |
f138f0f198156b4633b079f5e426d8c01e9e6ae452a2ec93544d3b6c43f692a5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / atlas4d-0.3.0-py3-none-any.whl
| Download URL | atlas4d-0.3.0-py3-none-any.whl |
|---|---|
| Size | 6.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a1bf8a04e391ffaa32a4145c839b9cb4d39cf78673e936b74047841c1e73c06a
|
|
BLAKE2b-256 checksum How to use checksums |
95b38d0edcf2dd86da3e1a839d5204c96c46db97e067ebf7f9f7ace3378de5e1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|