Skip to main content

Basic wrapper around the https://registry.o2a-data.de/api/ powered by pydantic.

Project description

O2A Registry API Wrapper

pipeline status coverage report Latest Release Ruff Documentation

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

o2a_registry_python_lib-0.2.0-py3-none-any.whl (26.6 kB view details)

Uploaded Python 3

File details

Details for the file o2a_registry_python_lib-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for o2a_registry_python_lib-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9d93283bd5bc2bb5bec28e5a8f85f50c8ff029f7fd39b719d9845e28d067c7b7
MD5 9cb1eeb298fed442263327abbc6ba3f9
BLAKE2b-256 b332c365a234f40e08a82e15443d638e315b8af507484cf8e769455f25dc5e7c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page