Giter Club home page Giter Club logo

template's Introduction

A Python project template

Basic usage

  1. Clone/download this repository.

  2. Install pipx and poetry

    python3 -m pip install --user pipx
    python3 -m pipx ensurepath
    pipx install peotry
    # add poetry to PATH
    
  3. Next, customize pyproject.toml and install with poetry:

    poetry install
    

    Make sure to select the poetry env as kernel in VSCode: Ctrl + Shift + P -> Select Interpreter

    | Note: Update dependencies in pyproject.toml after poetry update. Also update versions in pre-commit-config.yaml. To remove a poetry env, tpye: rm -rf $(poetry config virtualenvs.path)/*

Config.ini

Create a new config.ini based on the config.ini.template.

Use pre-commits for clean code

pre-commit is installed as part of the dev dependencies. Run pre commit from cli to execute pre-commits hook to sort, format and lint the code.

Database usage

If you want to use PostgreSQL as database, fire up a docker environment e.g. as provided in the compose.yaml:

sudo service docker start
sudo docker-compose -f compose.yaml --env-file config.ini up -d

Don't forget to provide the credentials within the config.ini.

Convenience startup for development

If everything is prepared as suggested above , use the script start.sh to:

  • start docker service
  • stop and clean up all containers
  • clean the (otherwise) persistent database volume
  • initialize containers
chmod +x start.sh
./start.sh

template's People

Contributors

uweremer avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.