Skip to content

Latest commit

 

History

History
93 lines (68 loc) · 4.66 KB

File metadata and controls

93 lines (68 loc) · 4.66 KB

mastering-python

Intermediate Level Overviews of Python

Writing Python Modules - Some Essential Python Libraries

OOP

Building RESTful APIs

Design Patterns

Building RESTful API Wrappers

Algorithms in Python

Virtual Environments

Creating Your First Project & Virtual Environment

# Create a directory and enter into it
mkdir myproject && cd myproject

# create a python env
pyvenv venv

# Put the venv in your .gitignore:
git init
echo 'venv' > .gitignore

Doing this keeps your virtual environment out of source control (Git).

# Activate the environment:
source venv/bin/activate

# Install packages
pip install requests bs4

# Freeze the requirements:
pip freeze > requirements.txt

# Check requirements.txt into source control:
git add requirements.txt