Metadata-Version: 2.4
Name: agimus
Version: 2.0.0
Summary: Python SDK for the Agimus Platform
Author-email: Agimus <support@agimus.ai>
License: MIT
Project-URL: Homepage, https://agimus.ai
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Typing :: Typed
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: httpx>=0.25.0
Requires-Dist: pyarrow>=17.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: mypy>=1.0; extra == "dev"

# Agimus Python SDK

Query and edit your ontology from Python. Discover its schema, filter and traverse objects, compute aggregates, execute read-only SQL, and retrieve typed Arrow tables. Synchronous and asynchronous clients share the same query builder.

## Install

```bash
pip install agimus
```

Requires Python 3.10+. Install `pandas` or `polars` separately for their DataFrame conversions.

## Connect and read

Create a key in your tenant's **API Access** page. Keep it outside source code:

```bash
export AGIMUS_API_KEY="agm_..."
# Optional; the default is https://api.agimus.ai
export AGIMUS_BASE_URL="https://api.agimus.ai"
```

```python
from agimus import AgimusClient

with AgimusClient() as client:
    print([entity["apiName"] for entity in client.list_entities()])

    # Replace these API names with those in your ontology.
    customers = client.objects("Customer")
    page = customers.filter(region="EU").fields("customerId", "name").page()
    for customer in page:
        print(customer)
```

For writes, use a read/write key and retain the version from your read:

```python
with AgimusClient() as client:
    customers = client.objects("Customer")
    customer = customers.get("C1")
    updated = customers.update("C1", {"name": "Acme Ltd"}, version=customer["_version"])
```

The SDK reads and writes ontology objects. Permissions apply to discovery, queries and writes. Large result delivery is followed automatically; resumable handles let you continue an execution after the client's deadline.

## Documentation

Sign in to the Agimus app and open **Resources → SDK & API Docs** for the SDK guide, SDK reference and HTTP API reference. These cover discovery, reads, relationships, aggregates, SQL, Arrow, writes, async usage, parameters, result types, errors and limits.

## License

MIT
