This is a learning repo with different projects/proof of concepts for playing with Python technologies/frameworks.
As part of 21 days of lockdown, I started learning python from March 25th, 2020.
cd pipenvpipenv install- Similar tonpm install. Creates 2 filesPipfileandPipfile.locksimilar topackage-lock.jsonin the javascript world with dependencies based onrequirements.txtpipenv shell- Activates the virtual environment. Much simpler thanvirtualenv- Once the shell is activated, run
python3 hello.pyto bring the Flask app UP!! - By default the flask app runs on 5000 port -
http://localhost:5000/hello pipenv install PyPDF2- installs the PyPDF2 package and updatesPipfileandPipfile.lockfiles.- Once the shell is activated, run
python3 pdf_reader.pyto read theexample.pdffile basics.py- file which includes all basic syntaxes in pythonmodules.py- python searches the list of directories from
sys.path. Usesys.path.append(directory_path)to add directory searches during import.
python3 Python 3.7.5 (default, Nov 1 2019, 02:16:32) [Clang 11.0.0 (clang-1100.0.33.8)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> sys.path ['', '/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/lib/python37.zip', '/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/lib/python3.7', '/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/lib/python3.7/lib-dynload', '/usr/local/lib/python3.7/site-packages']
- Alternatively use
PYTHONPATHto set the package/module import paths. - If a package has
__init__.py, it becomes a module learnis a module which is used inmodules.py
- python searches the list of directories from
- cd
functions - Started using callable functions inside a class
- Started using Functions and String manipulation
cd tuples- Started using
tuples
cd dictionaries- Started using
dictionaries - Started using
set
- Started with class usage and best practices
- class methods
- static methods
- class equals and repr
- Data Class usage
- Files and Directories
- Lambda
- Solving LeetCode program - Problem
Command used in Mac for installing supporting tools
- Python3 -
brew install python3 - Pipenv -
brew install pipenv
- Introducing Python - Oreilly - Most exhaustive and amazing book..!
- Projects to build after learning pythong