|
3 | 3 | [](https://pypi.org/project/robosystems-client/) |
4 | 4 | [](https://opensource.org/licenses/MIT) |
5 | 5 |
|
6 | | -Part of RoboSystems, the open-source knowledge graph for finance. The official Python client for the RoboSystems API: accounting, financial reporting, and investment management over the graph. Type-safe, generated from the OpenAPI spec, with GraphQL reads and idempotent operation writes. |
| 6 | +**The Python client for [RoboSystems](https://github.com/RoboFinSystems/robosystems), the open-source knowledge graph for finance.** `robosystems-client` covers the whole API: the `api` and `models` packages are generated from the OpenAPI specification, and the facades in `robosystems_client.clients` sit over them and the GraphQL reads: they set the auth header, follow queued work to its result, and retry rate-limited requests. |
7 | 7 |
|
8 | | -## Features |
9 | | - |
10 | | -- **Type-safe API client** with full type hints and typed models |
11 | | -- **Async client** for queries and operations |
12 | | -- **Parquet file uploads** for table ingestion into custom graphs |
13 | | -- **Row iteration** over query results with `stream_query`, which collects the full result before yielding rows |
14 | | -- **AI Operator** integration for natural language financial analysis |
15 | | -- **Typed errors** for GraphQL reads and queued work |
16 | | - |
17 | | -## Installation |
| 8 | +## Install |
18 | 9 |
|
19 | 10 | ```bash |
20 | 11 | pip install robosystems-client |
21 | 12 | ``` |
22 | 13 |
|
23 | | -## Resources |
| 14 | +Needs Python 3.12 or later. `pandas` is optional; only the DataFrame helpers need it. |
| 15 | + |
| 16 | +## Authentication |
| 17 | + |
| 18 | +Programs use an API key, created under **Settings → API keys** at [robosystems.ai](https://robosystems.ai). The clients route a credential by its shape: a key starting with `rfs` goes in the `X-API-Key` header, anything else in `Authorization: Bearer`. See [Authentication & API Keys](https://robosystems.ai/docs/technical/authentication-and-api-keys). |
| 19 | + |
| 20 | +## Usage |
| 21 | + |
| 22 | +The facades: |
| 23 | + |
| 24 | +```python |
| 25 | +from robosystems_client.clients import AuthenticatedClients |
| 26 | + |
| 27 | +# the base URL defaults to https://api.robosystems.ai |
| 28 | +clients = AuthenticatedClients("rfs...") |
| 29 | + |
| 30 | +result = clients.execute_query( |
| 31 | + "sec", |
| 32 | + "MATCH (e:Entity) WHERE e.ticker = $ticker RETURN e.name, e.cik", |
| 33 | + {"ticker": "NVDA"}, |
| 34 | +) |
| 35 | +trial_balance = clients.ledger.get_trial_balance("kg...", end_date="2026-03-31") |
| 36 | +clients.close() |
| 37 | +``` |
| 38 | + |
| 39 | +A client holds `query`, `operator`, `operations`, `graphs`, `files`, `tables`, `documents`, `ledger`, `investor` and `library`. The [facades README](robosystems_client/clients/README.md) covers each, with configuration, queued operations and errors. |
| 40 | + |
| 41 | +The generated client has one module per API operation, each with `sync`, `sync_detailed`, `asyncio` and `asyncio_detailed`; request and response types are in `robosystems_client.models`: |
| 42 | + |
| 43 | +```python |
| 44 | +from robosystems_client import AuthenticatedClient |
| 45 | +from robosystems_client.api.graphs import get_graphs |
| 46 | + |
| 47 | +client = AuthenticatedClient( |
| 48 | + base_url="https://api.robosystems.ai", |
| 49 | + token="rfs...", |
| 50 | + prefix="", |
| 51 | + auth_header_name="X-API-Key", |
| 52 | +) |
| 53 | +graphs = get_graphs.sync(client=client) |
| 54 | +``` |
| 55 | + |
| 56 | +## Versioning |
| 57 | + |
| 58 | +Semantic versioning in two tiers. **Stable**: the facades, the root exports, the error classes, the auth configuration and the symbols the [integration template](https://github.com/RoboFinSystems/robosystems-integration-template) imports; breaking them costs a major release, after a deprecation cycle. **Generated**: the rest of `api` and `models` tracks the API and can change in a minor release, with every removal named in the [release notes](https://github.com/RoboFinSystems/robosystems-python-client/releases). See [Versioning & Compatibility](https://robosystems.ai/docs/technical/versioning-and-compatibility). |
| 59 | + |
| 60 | +## Documentation |
24 | 61 |
|
25 | | -- [RoboSystems Platform](https://robosystems.ai) |
26 | | -- [GitHub Repository](https://github.com/RoboFinSystems/robosystems) |
27 | | -- [API Reference](https://robosystems.ai/docs/api) |
28 | | -- [OpenAPI Specification](https://api.robosystems.ai/openapi.json) |
| 62 | +- **API reference**: [robosystems.ai/docs/api](https://robosystems.ai/docs/api) · [OpenAPI specification](https://api.robosystems.ai/openapi.json) |
| 63 | +- **Technical docs**: [robosystems.ai/docs/technical](https://robosystems.ai/docs/technical) |
| 64 | +- **Related**: [RoboSystems](https://github.com/RoboFinSystems/robosystems) · [TypeScript client](https://github.com/RoboFinSystems/robosystems-typescript-client) · [MCP client](https://github.com/RoboFinSystems/robosystems-mcp-client) |
29 | 65 |
|
30 | 66 | ## Support |
31 | 67 |
|
32 | | -- [Issues](https://github.com/RoboFinSystems/robosystems-python-client/issues) |
33 | | -- [Documentation](https://robosystems.ai/docs/technical) |
34 | | -- [Projects](https://github.com/orgs/RoboFinSystems/projects) |
35 | | -- [Discussions](https://github.com/orgs/RoboFinSystems/discussions) |
| 68 | +- [Issues](https://github.com/RoboFinSystems/robosystems-python-client/issues) · [Discussions](https://github.com/orgs/RoboFinSystems/discussions) · [Projects](https://github.com/orgs/RoboFinSystems/projects) |
| 69 | +- [CONTRIBUTING.md](.github/CONTRIBUTING.md): branch conventions, coding standards and the pull request process |
36 | 70 |
|
37 | 71 | ## License |
38 | 72 |
|
|
0 commit comments