Registry / http-networking / ghga-service-chassis-lib

ghga-service-chassis-lib

JSON →
library0.17.8pypypiunverified

A library providing the base chassis functionality for microservices at GHGA (German Human Genome-Phenome Archive). It includes common patterns for API configuration, logging, error handling, and HTTP client utilities. Current version: 0.17.8. Release cadence: irregular, roughly monthly.

pip install ghga-service-chassis-lib
INSTALL
IMPORT
SIG · GHGA-SERVICE-CHASS
G
ghga-service-chassis-lib
http-networkingpythonv0.17.8
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ApiConfigBase
✓ from ghga_service_chassis_lib.api import ApiConfigBase
✗ from ghga_service_chassis_lib import ApiConfigBase
ApiConfigBase is in the api submodule, not top-level.
configure_logging
✓ from ghga_service_chassis_lib.logging import configure_logging
✗ from ghga_service_chassis_lib import configure_logging
Logging utilities are in the logging submodule.
HttpyExpect
✓ from ghga_service_chassis_lib.httpyexpect import HttpyExpect
✗ from ghga_service_chassis_lib.httpyexpect import httpyexpect
The class is capitalized 'HttpyExpect'.

Quickstart demonstrates creating a config class and setting up logging.

from ghga_service_chassis_lib.api import ApiConfigBase from ghga_service_chassis_lib.logging import configure_logging class MyConfig(ApiConfigBase): service_name: str = "my-service" service_instance_id: str = "001" config = MyConfig() configure_logging(config) print(f"Service {config.service_name} ready.")
Debug
Known issues
breakingBreaking change: In v0.17.0, the dependency pydantic was updated to v2. Config classes must now use pydantic v2 syntax.
fix
Update config models: replace 'class Config' with 'model_config = ConfigDict()' and use 'Field()' for validators if needed.
affects: >=0.17.0
breakingBreaking change: In v0.16.0, the httpyexpect library was updated, changing the exception hierarchy.
fix
Catch 'HttpyExpectError' instead of older exception types.
affects: >=0.16.0
gotchaThe library uses a namespace package structure. Installing multiple 'ghga-' packages may cause issues if not installed via pip.
fix
Always install via pip; avoid manually copying packages into site-packages.
affects: all
deprecatedThe 'api' submodule's 'configure_app' function is deprecated in favor of direct usage of FastAPI lifespan.
fix
Use FastAPI's lifespan context manager instead of 'configure_app'.
affects: >=0.17.0
Upgrade
Version history
0.17.8latest on PyPI · released Sep 25, 2023
Audit
Dependencies

No dependency data recorded yet.

Agent activity
18 hits · last 30 days
node
16
Amazon
1
OpenAI (training)
1
Resources
ghga-service-chassis-lib — pip install ghga-service-chassis-lib · libregistry