Metadata-Version: 2.4
Name: ghga_service_commons
Version: 8.1.0
Summary: A library that contains common functionality used in services of GHGA
Author-email: "German Human Genome Phenome Archive (GHGA)" <contact@ghga.de>
License: Apache 2.0
Project-URL: Repository, https://github.com/ghga-de/ghga
Project-URL: Release Notes, https://github.com/ghga-de/ghga/releases
Project-URL: Issue Tracker, https://github.com/ghga-de/ghga/issues
Classifier: Development Status :: 5 - Production/Stable
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Topic :: Internet :: WWW/HTTP :: HTTP Servers
Classifier: Topic :: Software Development :: Libraries
Classifier: Intended Audience :: Developers
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pydantic<3,>=2
Provides-Extra: api
Requires-Dist: fastapi<1,>=0.128; extra == "api"
Requires-Dist: uvicorn[standard]<1,>=0.40; extra == "api"
Requires-Dist: ghga-service-commons[http,objectstorage]; extra == "api"
Provides-Extra: http
Requires-Dist: httpx2<3,>=2.9.1; extra == "http"
Provides-Extra: auth
Requires-Dist: jwcrypto<2,>=1.5.6; extra == "auth"
Requires-Dist: pydantic[email]<3,>=2; extra == "auth"
Provides-Extra: crypt
Requires-Dist: pynacl<2,>=1.6.2; extra == "crypt"
Requires-Dist: crypt4gh<2,>=1.8.6; extra == "crypt"
Provides-Extra: dev
Requires-Dist: requests<3,>=2.32; extra == "dev"
Provides-Extra: objectstorage
Requires-Dist: hexkit[s3]>=8; extra == "objectstorage"
Provides-Extra: transports
Requires-Dist: tenacity<10,>=9.1.2; extra == "transports"
Requires-Dist: ghga-service-commons[http]; extra == "transports"
Provides-Extra: all
Requires-Dist: ghga-service-commons[api,auth,crypt,dev,http,objectstorage,transports]; extra == "all"
Dynamic: license-file

[![PyPI version shields.io](https://img.shields.io/pypi/v/ghga-service-commons.svg)](https://pypi.org/project/ghga-service-commons/)
[![PyPI pyversions](https://img.shields.io/pypi/pyversions/ghga-service-commons.svg)](https://pypi.org/project/ghga-service-commons/)

# ghga-service-commons
This Python library serves as a collection of common utilities used by
the microservices developed at German Human Genome-Phenome Archive (GHGA).

It collects boilerplate code for common functionalities such as API server setup,
authentication and authorization.

This library is primarily intended for internal use at GHGA and should
not be seen as a general-purpose microservice chassis.
However, if this library matches your specific needs as well,
please feel free to use it. It is open source.

# Installation
This package is available at PyPI:
https://pypi.org/project/ghga_service_commons

You can install it from there using:
```
pip install ghga_service_commons
```

Thereby, you may specify following extra(s):
- `api`: dependencies needed to use the API server functionalities
- `auth`: dependencies needed for dealing with authentication and authorization

## Development

This package is a member of the [GHGA monorepo](https://github.com/ghga-de/ghga) and is
developed from the repository root rather than on its own. The repository ships a
devcontainer with the whole toolchain: open it in VS Code and run
`Remote-Containers: Reopen in Container`, or set the environment up directly with
`just sync`.

The usual tasks, run from the repository root (see
[ADR-0015](https://github.com/ghga-de/ghga/blob/main/docs/adr/0015-task-runner.md) for the
full recipe list):

```bash
just sync                            # install every member plus the shared dev toolchain
just test libs/ghga-service-commons  # this member's test suite
just lint                            # ruff check + format check across the workspace
```

## License
This repository is free to use and modify according to the [Apache 2.0 License](https://github.com/ghga-de/ghga/blob/main/libs/ghga-service-commons/LICENSE).
