Skip to content

Python DevOps course material that I created for the coding club of TSP.

Notifications You must be signed in to change notification settings

Sckathach/python-devops-course

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python DevOps Course

Python DevOps course material that I created for the coding club of TSP (Club Code).

Installation

Install a virtual environment:

python -m venv venv 
source venv/bin/activate
pip install -r requirements.txt

Create a gitignore, you can use a plugin of your IDE, download one, or create one by yourself.

curl https://raw.githubusercontent.com/github/gitignore/main/Python.gitignore -o .gitignore

Create the requirements.txt file

It can simply be achieved with pip:

pip freeze > requirements.txt

⚠️ pyproject.toml has to be updated!

You can use a script to update pyproject.toml:

python update_pyproject.py 

Structure

The structure can be obtained with tree --gitignore -a --matchdirs -I .git.

├── .gitignore
├── main.py
└── README.md

Flask

Create a token (flask secret key) in .env at the root of the project:

FLASK_SECRET_KEY=your-secret-key

You can then modify it when calling the script:

python api.py FLASK_SECRET_KEY=my-super-key

Or directly in the environment (Docker, Kubernetes, etc.).

About

Python DevOps course material that I created for the coding club of TSP.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published