Skip to content

A general purpose template for python packages and applications.

License

Notifications You must be signed in to change notification settings

KerstenBreuer/python-template

 
 

Repository files navigation

General-Purpose Python Template

This is a general-purpose template for python packages and applications.

It features:

  • A devcontainer-based fully-configured development environment for vscode
  • Tight linting and formatting using Ruff
  • Static type checking using mypy
  • Security scanning using bandit
  • A structure for automated tests using pytest
  • Dependency locking using pip-tools
  • Git hooks checking linting and formatting before committing using pre-commit
  • GitHub Actions for automating or checking all of the above

Here the intro to the template stops and the actual template for the readme of the microservice starts:


tests

My Custom App

My-Custom-App - a short description

Description

Here you should provide a short summary of the purpose of this microservice.

Development

For setting up the development environment, we rely on the devcontainer feature of VS Code in combination with Docker Compose.

To use it, you have to have Docker Compose as well as VS Code with its "Remote - Containers" extension (ms-vscode-remote.remote-containers) installed. Then open this repository in VS Code and run the command Remote-Containers: Reopen in Container from the VS Code "Command Palette".

This will give you a full-fledged, pre-configured development environment including:

  • infrastructural dependencies of the service (databases, etc.)
  • all relevant VS Code extensions pre-installed
  • pre-configured linting and auto-formatting
  • a pre-configured debugger
  • automatic license-header insertion

Moreover, inside the devcontainer, a convenience commands dev_install is available. It installs the service with all development dependencies, installs pre-commit.

The installation is performed automatically when you build the devcontainer. However, if you update dependencies in the ./pyproject.toml or the ./requirements-dev.txt, please run it again.

License

This repository is free to use and modify according to the Apache 2.0 License.

About

A general purpose template for python packages and applications.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 89.3%
  • Dockerfile 9.2%
  • Shell 1.5%