Skip to main content

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

  1. Clone the repository:

    git clone git@github.com:reten/service-core.git
    cd service-core
    
  2. Create and activate virtual environment:

    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
    
  3. Install development dependencies:

    pip install -e ".[dev]"
    
  4. 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

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes
  4. Run quality checks:
    # Run tests
    pytest
    
    # Run linting
    ruff check .
    ruff format .
    
  5. Commit your changes (using Conventional Commits)
  6. Push to your fork
  7. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

reten_service_core-0.1.0.tar.gz (28.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

reten_service_core-0.1.0-py3-none-any.whl (14.7 kB view details)

Uploaded Python 3

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

Hashes for reten_service_core-0.1.0.tar.gz
Algorithm Hash digest
SHA256 eab8d8ccbe90769933a02763a60e0ff8ad3f75e5bdcc9b2b9cafc0e1ceebc99f
MD5 ef8abf77b094a9996856dc72ce4aef45
BLAKE2b-256 ddbb6aa32eea6cee6c6f0c41ea48cc72e5da07fe365f5617126eba322a5aa9d1

See more details on using hashes here.

File details

Details for the file reten_service_core-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for reten_service_core-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f1a1f43562e54f430f3c689814ba950f06e0e81bdc2e7f3a8bc96a5d1526d432
MD5 02430955a35c2605a90d113ba711a227
BLAKE2b-256 c6178304759a3a2db1f2773f65a956380c88f0395a7f5e01859029a33158302c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page