O2A Registry API Wrapper
Basic wrapper around the registry API powered by pydantic.
Note: Currently, rate limited to 100 requests/sec
Example Usage
from o2a_registry.api import ProductionAPI # registry.o2a-data.de
from o2a_registry.api import SandboxAPI # registry.sandbox.o2a-data.de
event_types = await ProductionAPI.get_vocables(where="vocableGroup.id==8")
await ProductionAPI.close()
Custom endpoint:
from o2a_registry.api import RegistryApi
api = RegistryApi("example.com", ssl=True)
Further examples can be found in examples
Install
Currently, only available from the gitlab repository:
pip install o2a.registry.python.lib
Setting up the project locally
This project uses the package manager uv
git clone git@gitlab.awi.de:o2a/registry/o2a.registry.python.lib.git
cd o2a.registry.python.lib
uv sync
This creates a virtual environment in o2a.registry.python.lib/.venv/.
The code formatter Ruff is used to ensure proper
code formatting. Use uv tool install ruff to install and uvx ruff format .
to run.
Before pushing changes, please ensure that your code works and is well formated. You can do this with:
uvx ruff check --fix
uvx ruff format
uv run mypy o2a_registry
uv run pytest ./tests/unit
Generate documentation
Install the necessary dependencies with
uv sync --group doc
Build documentation with
uv run sphinx-build -M html docs/source/ docs/build/
Open docs/build/html/index.html to see the result.
Contents:
- Getting Started
- API
RegistryApiContactCreateContactCreateEventCreateItemCreateMissionCreateMissionItemDecommissionWorkflowEditContactEditEventEditItemEditMissionEventItemItemContactItemReferenceItemStateMissionMissionContactMountWorkflowParameterPropertyTemporalCoverageUnMountWorkflowUnitVersionVocableVocableGroupWorkflow
- Utility Functions