Skip to main content

tests PyPI version shields.io PyPI pyversions Coverage Status

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

For setting up the development environment, we rely on the devcontainer feature of vscode.

To use it, you have to have Docker as well as vscode with its "Remote - Containers" extension (ms-vscode-remote.remote-containers) installed. Then, you just have to open this repo in vscode and run the command Remote-Containers: Reopen in Container from the vscode "Command Palette".

This will give you a full-fledged, pre-configured development environment including:

  • infrastructural dependencies of the service (databases, etc.)
  • all relevant vscode extensions pre-installed
  • pre-configured linting and auto-formatting
  • a pre-configured debugger
  • automatic license-header insertion

Moreover, inside the devcontainer, there is following convenience command available (please type it in the integrated terminal of vscode):

  • dev_install - install the lib with all development dependencies and pre-commit hooks (please run that if you are starting the devcontainer for the first time or if added any python dependencies to the ./pyproject.toml)

If you prefer not to use vscode, you could get a similar setup (without the editor specific features) by running the following commands:

# Execute in the repo's root dir:
cd ./.devcontainer

# build and run the environment with docker-compose
docker build -t ghga-service-commons .
docker run -it ghga-service-commons /bin/bash

License

This repository is free to use and modify according to the Apache 2.0 License.

Metadata

Release files for ghga_service_commons 8.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ghga_service_commons 8.0.0
File Size Uploaded Provenance Actions
ghga_service_commons-8.0.0.tar.gz 42.1 kB Without provenance Details for ghga_service_commons-8.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ghga_service_commons 8.0.0
File Interpreter ABI Platform Actions
ghga_service_commons-8.0.0-py3-none-any.whl Python 3 none any Details for ghga_service_commons-8.0.0-py3-none-any.whl

Total release size: 113.5 kB

Release files / ghga_service_commons-8.0.0.tar.gz

Download URL ghga_service_commons-8.0.0.tar.gz
Size 42.1 kB
Tags Source
SHA-256 checksum
How to use checksums
d54515e2d509f70e345d8b5e2651de083fd958a50c4371a0857241753b4dc59f
BLAKE2b-256 checksum
How to use checksums
2cd36184d30a32ef55509d53b8be239976412151f78db2aceace139db26ece4f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.14

Release files / ghga_service_commons-8.0.0-py3-none-any.whl

Download URL ghga_service_commons-8.0.0-py3-none-any.whl
Size 71.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ae54aa400d1f366d90d8c2c3d1ee94009e234d2ca654694f8ba9c15cfd98bf20
BLAKE2b-256 checksum
How to use checksums
582a323786d3f609d83af3f61e9ec47aa65dc22b8bb5286ea211424105d01d71
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.14

Security for ghga_service_commons 8.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

8.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page