srx-lib-core
Core utilities for SRX Python services. Small, generic helpers you can reuse across FastAPI-based microservices.
What it includes:
- Logging setup with loguru (
get_logger,setup_logger) - Base settings class with Pydantic Settings
- FastAPI app factory with sensible defaults (CORS, exception handling, health route)
Install
PyPI (public):
pip install srx-lib-core
Using uv (pyproject):
[project]
dependencies = ["srx-lib-core>=0.1.0"]
Usage
Logging:
from srx_lib_core import get_logger
logger = get_logger(__name__)
logger.info("hello")
Settings:
from srx_lib_core import BaseServiceSettings
class Settings(BaseServiceSettings):
OPENAI_API_KEY: str | None = None
settings = Settings() # loads from .env by default
FastAPI app factory:
from fastapi import APIRouter
from srx_lib_core import create_app
router = APIRouter()
@router.get("/health")
def health():
return {"status": "ok"}
app = create_app(title="my-service", routers=[router])
Environment Variables
LOG_LEVEL(default:INFO)LOG_FILE(optional path)ENVIRONMENT(default:development)CORS_ORIGIN(comma-separated origins; default empty)
Release
This repo ships a GitHub Actions workflow that publishes to GitHub Packages on tags v*.
- Create a tag:
git tag v0.1.0 && git push --tags - The workflow uses
GITHUB_TOKENwithpackages:write.
License
Proprietary © SRX
Metadata
Release files for srx-lib-core 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| srx_lib_core-0.1.2.tar.gz | 3.1 kB | Without provenance | Details for srx_lib_core-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| srx_lib_core-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for srx_lib_core-0.1.2-py3-none-any.whl |
Total release size: 6.9 kB
Release files / srx_lib_core-0.1.2.tar.gz
| Download URL | srx_lib_core-0.1.2.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d1370083076e823263585240f61780390b597212a13c37e9ee1d37d9cf9d776b
|
|
BLAKE2b-256 checksum How to use checksums |
261eaf95fa515a2e02b41f31cf5ef2ccb425539aab82a30fbc5b81dd7385d672
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.11
|
Release files / srx_lib_core-0.1.2-py3-none-any.whl
| Download URL | srx_lib_core-0.1.2-py3-none-any.whl |
|---|---|
| Size | 3.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c92534f73285ef41ccad327bdac8aa9b8cb15d15fb18f01265e817fccd419d3c
|
|
BLAKE2b-256 checksum How to use checksums |
4190804a3446e14ca9af7f677b711cc0f669c3a7b1676ab5b0647d640588e50f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.11
|
Security for srx-lib-core 0.1.2
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.