Skip to content

smaragd/python-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Project Template

This is a Python project template using pip-tools. It is just a bootstrap for future me to avoid some of the new project boilerplate.

Setup

Build the venv:

$ python3 -m venv venv
$ ./venv/bin/pip install --upgrade pip
$ ./venv/bin/pip install pip-tools
$ ./venv/bin/pip-compile
$ ./venv/bin/pip-sync

For the development environment, get additional packages and tools installed:

$ ./venv/bin/pip-compile --extra dev

Strict Type Checking and Code Formatting

Use mypy to perform a strict type check:

$ ./venv/bin/mypy src/

Use black to format the cod:

$ ./venv/bin/black src tests

Running the Test Cases

To run your tests:

$ ./venv/bin/pytest

About

Base project structure for a new Python app using FastAPI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published