DevOps Classroom notes 16/Oct/2025

Lets build an inventory

  • We will have product(S)
  • We will have quantities
  • We will be selling and procuring
  • Refer Here for some experiments done with inventory
  • Topics covered

    • dataclass
    • package: A python package is a folder with __init__.py in it. Package name will be folder name. A package can have subpackages
    • PYPI:

Building a python project

Approach 1:

  • create a new folder
  • Create a virtual environment
python -m venv .venv
  • Activate the virtual environment
# windows
.venv/Scripts/activate

# mac or linux

source .venv/bin/activate
  • Add necessary packages
pip install boto3
  • Create requirements.txt
pip freeze > requirements.txt
  • To install from requirements.txt
pip install -r requirements.txt

Aproach 2

  • using uv
  • install uv
#windows
winget install --id=astral-sh.uv  -e
# mac
brew install uv
# linux
wget -qO- https://astral.sh/uv/install.sh | sh
  • create a new directory warehouse and cd into it
  • To build a simple application
uv init .
  • To build a package
uv init --package .
  • Run uv sync and then activate virtual environment
  • Adding packages can be done
uv pip install .....
uv add .....
  • Refer Here for the warehouse first set changes
  • we need to test the code which we have written so far, so lets add a popular unit testing framework in python pytest
uv add --dev pytest

Published
Categorized as Uncategorized Tagged

By continuous learner

devops & cloud enthusiastic learner

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Animated Social Media Icons by Acurax Responsive Web Designing Company

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Visit Us On FacebookVisit Us On LinkedinVisit Us On Youtube