https://github.com/and3sil4/python.learn
Python reforce to the admission course
https://github.com/and3sil4/python.learn
Last synced: 26 days ago
JSON representation
Python reforce to the admission course
- Host: GitHub
- URL: https://github.com/and3sil4/python.learn
- Owner: AND3SIL4
- Created: 2024-03-01T20:53:29.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-15T17:04:27.000Z (about 1 month ago)
- Last Synced: 2025-03-15T18:20:08.557Z (about 1 month ago)
- Language: Python
- Size: 68.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# This repository was created in order to store the basic concepts in Python language
## Python completely tech stack
### Best practices
- **Python packages**: uv
```sh
brew install uv
uv init [project_name]
cd [project_name]
uv add --dev [dependency] # uv add ruff, create automatily the virtual environment
uv tool install [dependency] # to install any dependency
uv tool upgrade [dependency]
uv tree # see the tree of dependencies installed
uv run [dependency] check # check for updates of the dependency
uvx [dependency] # for running packages, it's a shorcut for 'uv tool run [dependency]'
```- **Linter**: ruff
```sh
ruff check [file (optional)] # validate if the file are correct or not
ruff check [file (optional)] --fix # fix the inconsistencies into file
ruff format [file (optional)] # to format after fixing linter validation
```- **Configuration file**: pyproject.toml
```toml
# Config base file
[project]
name = "basic-fastapi"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.13"
dependencies = [][dependency-groups]
dev = [
"ruff>=0.9.3",
]# Ruff config file in this root location
# ruff.toml# custom scripts
[project.scripts]
```### Technologies
- **Backend**: FastApi
```sh
uv add fastapi --extra standard # for adding the dependencies in pyproject.toml
uv run fastapi dev # it should contain the main.py file
``````txt
project
└── app
├── __init__.py
├── main.py
├── dependencies.py
├── routers
│ ├── __init__.py
│ ├── items.py
│ └── users.py
└── internal
├── __init__.py
└── admin.py
``````sh
# Activate the virtual environment
source ./venv/bin/activate
# Deactivate the virtual environment
deactivate
```- **Container**: Docker
```sh
# go to docker [docker-docs](https://docs.docker.com/engine/install/debian/#install-from-a-package)
# run the following command
sudo docker run hello-world
# add the permissions to execute docker command
sudo usermod -aG docker $USER
# refresh the users permissions
newgrp docker
```## Here is the order of exercises at each level follow up by roadmap.sh
1. Beginner
- [task tracker](https://roadmap.sh/projects/task-tracker)
2. Intermediate
-
3. Advanced
-