A dog food template repository for myself
pyenv install 3.9.1
pyenv rehash # optional; make sure right runtime is loaded
pip install pipenv
# --dev includes dev depedencies
pipenv install --dev
- main with arguments
- logging format
Dockerfile
and shell script to make docker imagesetup.py
to make package
contains basic arguments and logging function
Tip: Use a Human-Readable Logging Format
- Highly human readable
- clearly distinguish the different information blocks at a glance
- know in which column to look for the information we’re currently searching
- Which Information to Include
- Date & Time
- Logging level
- Logger name
- File name
- Line number
- The message itself
- An example
> python app/main.py
[INFO] 2020-02-28 21:40:04 | root | main.py | 43 | dry run: True
This repo includes a setup.py
script for others to install your app by Github URL.
- Add this line in your
requirements.txt
:
git+ssh://github.com/leafwind/create-python-app.git@[tag_name]#egg=create-python-app
pip install -r requirements.txt
pip install ssh://github.com/leafwind/create-python-app.git@[tag_name]#egg=create-python-app
- Uninstall
pip uninstall create-python-app
docker_build.sh
docker_run.sh
./scripts/pre_commit_check.sh
check https://pre-commit.com/ to setup pre-commit hook.