Skip to content

Instantly share code, notes, and snippets.

@ShilGen
Last active April 30, 2026 20:59
Show Gist options
  • Select an option

  • Save ShilGen/8563d183b67314273558e3369c32cf1a to your computer and use it in GitHub Desktop.

Select an option

Save ShilGen/8563d183b67314273558e3369c32cf1a to your computer and use it in GitHub Desktop.

Python3

  1. Simple FastAPI app with websocket exchange
  2. Decorator for measure time of function's execution

1️⃣ New Folder

mkdir my_project && cd my_project

2️⃣ Work space

python3 -m venv .venv
source .venv/bin/activate

3️⃣ Base set of files

touch main.py requirements.txt .env .gitignore

4️⃣ Fill .gitignore

echo ".venv/
__pycache__/
.env  .gitignore

5️⃣ Start Pack

pip install -U pip
pip install black python-dotenv
pip install -r requirements.txt
@ShilGen

ShilGen commented Apr 16, 2026

Copy link
Copy Markdown
Author

apt install python3.12-venv

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment