Python Classroom notes 02/May/2025

Object oriented programming

  • SOLID Priniciples
  • To continue building our calculator, we need to
    • unit test
    • exception handling
    • abstraction
    • standard library
    • pythonic coding

Python abstract classes

Create virtual environment in python

  • Refer Here for virtual environment
  • Lets Create virtual environment and follow standard structure
  • create a new folder
  • now cd into this folder
  • Create a virtual environment
python -m venv .venv
  • Now activate virtual environment
    • Window .venv\Scripts\activate
    • mac/linux source .venv/bin/activate
  • To download additional packages
pip install <package>
  • To list all the installed packages
pip freeze
pip freeze > requirements.txt
  • To install dependencies from requirements.txt
pip install -r requirements.txt
  • Exercise:
    • create a new folder
    • activate the virtual environment
    • install the package called pytest
Published
Categorized as Uncategorized Tagged

By continuous learner

devops & cloud enthusiastic learner

Leave a ReplyCancel reply

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

Please turn AdBlock off
Social Media Icons Powered by Acurax Web Design Company

Discover more from Direct DevOps from Quality Thought

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

Continue reading

Exit mobile version
%%footer%%