Core library providing common components and utilities for Reten microservices
Project description
Reten Service Core Library
Core library providing common components and utilities for Reten microservices.
Features
- Authentication: API Key and JWT authentication
- Logging: Structured logging configuration
- Monitoring: Metrics and distributed tracing
- Storage: Database clients (BigQuery, Redis)
- Testing: Common fixtures and mocks
- Utilities: Common helper functions
Installation
pip install reten-service-core
For development:
pip install reten-service-core[dev]
Quick Start
from fastapi import FastAPI
from reten_service_core import APIKeyAuth
from reten_service_core.logging import configure_logging
from reten_service_core.monitoring import metrics
# Configure logging
configure_logging()
# Create FastAPI app with auth
app = FastAPI()
app.include_middleware(APIKeyAuth)
# Add metrics
@app.get("/")
@metrics.track_latency()
async def root():
return {"message": "Hello World"}
Development
-
Clone the repository:
git clone git@github.com:reten/service-core.git cd service-core
-
Create and activate virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install development dependencies:
pip install -e ".[dev]"
-
Run tests:
pytest
Contributing
We welcome contributions to the Reten Service Core library! Whether it's:
- 🐛 Bug fixes
- ✨ New features
- 📚 Documentation improvements
- 🧪 Additional tests
- 🔧 Infrastructure updates
Quick Start
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Run quality checks:
# Run tests pytest # Run linting ruff check . ruff format .
- Commit your changes (using Conventional Commits)
- Push to your fork
- Open a Pull Request
Development Environment
See the Development section above for basic setup instructions.
Detailed Guidelines
For detailed information about:
- Code style and standards
- Testing requirements
- Pull request process
- Development environment setup
- Commit message conventions
Please read our Contributing Guide.
Need Help?
- 📖 Check the examples directory for usage examples
- 🤔 Open an issue for questions or problems
- 💬 Contact the maintainers at dev@reten.ai
License
This project is licensed under the MIT License - see the LICENSE file for details.
What does this mean?
- ✅ Commercial use
- ✅ Modification
- ✅ Distribution
- ✅ Private use
- ⚠️ No liability
- ⚠️ No warranty
The MIT License is a permissive license that allows you to do anything you want with the code as long as you include the original copyright and license notice in any copy of the software/source.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file reten_service_core-0.1.0.tar.gz.
File metadata
- Download URL: reten_service_core-0.1.0.tar.gz
- Upload date:
- Size: 28.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eab8d8ccbe90769933a02763a60e0ff8ad3f75e5bdcc9b2b9cafc0e1ceebc99f
|
|
| MD5 |
ef8abf77b094a9996856dc72ce4aef45
|
|
| BLAKE2b-256 |
ddbb6aa32eea6cee6c6f0c41ea48cc72e5da07fe365f5617126eba322a5aa9d1
|
File details
Details for the file reten_service_core-0.1.0-py3-none-any.whl.
File metadata
- Download URL: reten_service_core-0.1.0-py3-none-any.whl
- Upload date:
- Size: 14.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f1a1f43562e54f430f3c689814ba950f06e0e81bdc2e7f3a8bc96a5d1526d432
|
|
| MD5 |
02430955a35c2605a90d113ba711a227
|
|
| BLAKE2b-256 |
c6178304759a3a2db1f2773f65a956380c88f0395a7f5e01859029a33158302c
|