/python-idioms

Effective Python

Primary LanguagePython

About

This is a collection of Python 3.x idioms, datastructures and effective code.

Main topics covered so far:

  • data structures
  • expressions
  • meta classes, dynamic object construction
  • internals of Python, useful hacks
  • testing

Overview

Preliminary steps

  1. First check the version - it should be 3.9.x (3.9.1 in our case)
python --version

Python 3.9.1
  1. Create a virtual environment
python -m venv env

As a result a folder env with python libs will be created

  1. Activate virtual env:
./env/Scripts/activate

The prompt will be changed to (env)

  1. Install necessary dependencies into virtual environment:
pip install -r requirements.txt

As a result all extra dependencies will be added