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 comment

Turn on JavaScript to leave a comment.

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
Exit mobile version
%%footer%%