Skip to main content

Add your description here

Project description

Service Template Project

A Python-based service template designed to streamline the creation of scalable, well-structured microservices. This project provides a robust starting point for building RESTful APIs, complete with best practices for code organization, logging, dependency management, and more.

Features

  • 📂 Clean Architecture: Predefined folder structure for easy scalability and maintainability.
  • ⚙️ Customizable CLI: Includes a CLI for generating services with click and rich formatting.
  • 🔧 Built-in Tools:
    • FastAPI for API development.
    • SQLModel for database interactions.
    • Uvicorn for fast and efficient server hosting.
  • 📜 Logging: Centralized and configurable logging system.
  • 🧪 Pre-configured Testing: Pytest setup with sample tests.
  • 🐳 Dockerized: Ready-to-use Dockerfile for containerized deployments.
  • 🛠️ CI/CD Ready: Includes a Makefile and GitHub pre-commit hooks for formatting and linting (isort, black, mypy, flake8).
  • 📖 Configuration: Environment management via .env files.

Getting Started

Prerequisites

  1. Python 3.10+ installed.

Installation

  1. Clone the repository:

    python -m pip install service-template
    

Running the template

  1. Set up a virtual environment:

    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
    
  2. Clone the repository:

    service template init
    

Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository.
  2. Create a feature branch: git checkout -b feature/your-feature.
  3. Commit your changes: git commit -m "Add your feature".
  4. Push to the branch: git push origin feature/your-feature.
  5. Open a pull request.

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

service_template-0.1.0.tar.gz (66.1 kB view details)

Uploaded Source

Built Distribution

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

service_template-0.1.0-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file service_template-0.1.0.tar.gz.

File metadata

  • Download URL: service_template-0.1.0.tar.gz
  • Upload date:
  • Size: 66.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.6

File hashes

Hashes for service_template-0.1.0.tar.gz
Algorithm Hash digest
SHA256 344967f0c7634c61b1487e032e46ff6a9102ed254ebade575102ecdac368b257
MD5 6666e683f9d15dc62641a16935bb0af9
BLAKE2b-256 6eb3d97b87cd57ebd67f8223a5563525bfa8a4699d37c8eb3f9e18b26f3fe848

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for service_template-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a9dbd3e9ddf3b5577076b413769f348a021bc12343246885f9bb53ab6d514e4d
MD5 3e690d765cd6f0d80cd05bde208cea73
BLAKE2b-256 141ce14c54fd86b3903676603927c9d009f4fae2ec2506cace4c5a4ec2c841a3

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