Skip to content

stapetro/demo-tpl-py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

demo-tpl-py boilerplate setup guide

DISCLAIMER

This boilerplate is used for demo purposes as part of education sessions/trainings. It doesn't include many aspects which should be present in production-ready project setup. However, all the tools around the sample code are configured properly and can be reused in projects.

Software requirements

  1. Install pyenv (*Unix) or pyenv-win (Windows).
  2. Install latest python version as global one via pyenv. If you have already an installed Python on a system level, skip this step.
    # Commands below illustrate what you need to do as an idea.
    # Exact commands might change depending on a particular OS.
    $ pyenv install -l | grep 3.11.5
    $ pyenv install 3.11.5
    $ pyenv global 3.11.5
  3. Install Poetry package manager.
  4. Install make CLI tool.
    # Debian-based Linux distro
    $ sudo apt update
    $ sudo apt install build-essential
    OR
    # Windows
    $ choco install make

Initial setup

  1. Clone the repository.
  2. Execute make build-all.

Build process digested into step by step

You can see all steps documented with the following command:

$ make help

Install project dependencies

$ make init

Format all files

$ make format

Static code analysis of all files

  • Runs all checks on your local OS
$ make check
  • Runs all checks inside a Linux Docker container:
$ make docker-check

Tests with coverage check

$ make test

Solution

Run locally

$ make run

Run in Docker

$ make docker-build
$ make docker-run

About

Demo template for Python backend

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published