semvec/pypi-packages huggingface dataset:
o2a.registry.python.lib 0.4.0
Basic wrapper around the https://registry.o2a-data.de/api/ powered by pydantic.
Requires Python: >=3.10
Keywords: O2A, api, registry

# O2A Registry API Wrapper

[![pipeline status](https://gitlab.awi.de/data-logistics-support/o2a-registry-py/badges/main/pipeline.svg)](https://gitlab.awi.de/data-logistics-support/o2a-registry-py/-/commits/main)
[![coverage report](https://gitlab.awi.de/data-logistics-support/o2a-registry-py/badges/main/coverage.svg)](https://gitlab.awi.de/data-logistics-support/o2a-registry-py/-/commits/main)
[![Latest Release](https://gitlab.awi.de/data-logistics-support/o2a-registry-py/-/badges/release.svg)](https://gitlab.awi.de/data-logistics-support/o2a-registry-py/-/releases)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
[![Documentation](https://img.shields.io/badge/Documentation-o2a--data.de-blue)](https://o2a-data.de/docs/o2a-registry-py/getting_started.html)

Basic wrapper around the [registry API](https://registry.o2a-data.de/api/)
powered by [pydantic](https://docs.pydantic.dev/latest/).

Note: Currently, rate limited to 100 requests/sec

## Example Usage

```python
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:

```python
from o2a_registry.api import RegistryApi

api = RegistryApi("example.com", ssl=True)
```

Further examples can be found in
[examples](https://gitlab.awi.de/data-logistics-support/o2a-registry-py/-/tree/main/examples?ref_type=heads)

## Install

Currently, only available from the gitlab repository:

```shell
pip install o2a.registry.python.lib
```

## Setting up the project locally

This project uses the package manager [uv](https://docs.astral.sh/uv/)

```shell
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](https://docs.astral.sh/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:

```shell
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.
pyfao56v2 0.5.13
Enhanced pyFAO56 library
Requires Python: ~=3.10.0
Keywords: agriculture, crop, evapotranspiration, fao56, irrigation, pyfao56, water

# pyfao56 v2
Enhanced pyFAO56 library

## Installation

You can install the latest release of `pyfao56v2` with pip (recommended):
```bash
pip install pyfao56v2
```

This library is also hosted on TestPyPI for testing purposes:
```bash
pip install --extra-index-url https://test.pypi.org/simple/ pyfao56v2
```

## Usage

`pyfao56v2` can be used to run a water balance simulation given a set of input parameters:
- soil parameters
- crop parameters
- historical weather data
- irrigation data (optional)
- autoirrigation rule(s) (optional)

See the [example.ipynb](https://github.com/links-ads/guardians-pyfao56/blob/main/docs/example.ipynb) notebook for a detailed example.

## Contributing

Interested in contributing? Check out the contributing guidelines. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.

## License

`pyfao56v2` was created by Tommaso Monopoli. It is licensed under the terms of the MIT license.
This package is based on the [`pyfao56`](https://github.com/kthorp/pyfao56) library, developed by USDA-ARS and licensed under the terms of the [CC0 1.0 Universal](https://creativecommons.org/publicdomain/zero/1.0/) (no copyright).
This project is not affiliated with or endorsed by the USDA-ARS.

## Credits

This work builds upon the [`pyfao56`](https://github.com/kthorp/pyfao56) library, developed by USDA-ARS.
The CI-CD workflow is based on the [py-pkgs.org](https://py-pkgs.org/) guide.