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 7.0.4

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 7.0.4
File Size Uploaded Provenance Actions
ghga_service_commons-7.0.4.tar.gz 41.6 kB Without provenance Details for ghga_service_commons-7.0.4.tar.gz

Built distribution (wheel)

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

Total release size: 112.5 kB

Release files / ghga_service_commons-7.0.4.tar.gz

Download URL ghga_service_commons-7.0.4.tar.gz
Size 41.6 kB
Tags Source
SHA-256 checksum
How to use checksums
f3457d2b2081aef18c2f83299d53344efe8089ec77ca7e9ab7abbb1e4641cf86
BLAKE2b-256 checksum
How to use checksums
a0ecb3eff5e7294ea6f564d8df82ba6d74b8841aa3d138e2114c5ef5ddffe888
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

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

Download URL ghga_service_commons-7.0.4-py3-none-any.whl
Size 70.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3f12718eb5e5d279e3f57b80f0a1677be2b5d635d12e45d0e878f3ecaaec1d0e
BLAKE2b-256 checksum
How to use checksums
63be91c8f6c7f89c09849b2c4f21f52d8c182905b0b624270dd799ccd81b20c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Security for ghga_service_commons 7.0.4

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

7.0.4 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