This a template for developing Python application and libraries in an enclosed and safe environment. We are using Docker to provide a reproducible environment which can be used for active development, python packaging for releases and CI/CD workflows.
Copy the example environmental file .env.example
to .env
and (if necessary)
add environmental variables.
$ > cp .env.example .env
Start and bash into development container.
$ > make bash
Now your environment is setup. All changes to the codebase are reflected in the container, since they are mounted.
The first thing you want to do is give your project a proper name.
-
Rename the
project
in pyproject.toml and update thedescription
. -
Rename the
app/src/app
to your project name.$ > mv app/src/app app/src/<projectname>
Add your dependencies to the project.
-
Enter the development container.
$ > make bash
-
Use
rye
to add the dependencies. You can find an introduction torye
here.$ > rye add <dependent package> # like flask, numpy or pandas
-
Install the dependencies.
$ > rye sync
The next time you build the container your dependencies have been installed.
A fresh start. Just move the blank README.md over here and start with your project.
$ > mv app/README.md .
This template is just the barebone to get a Python Open Source Software (OSS) project up and running. Don't forget change the license, add a CHANGE.md and a CODE_OF_CONDUCT.md. But that is up to your 😄