1
2
3
1.
Configure your first project
# sudo apt-get install python3-venv
> pip3 install venv
> mkdir -p new_project
> cd new_project
> python3 -m venv venv
> ls -l venv
drwxrwxr-x 2 python_dev python_dev 4096 Feb 26 11:19 bin
drwxrwxr-x 2 python_dev python_dev 4096 Feb 26 11:19 include
drwxrwxr-x 3 python_dev python_dev 4096 Feb 26 11:19 lib
lrwxrwxrwx 1 python_dev python_dev 3 Feb 26 11:19 lib64 -> lib
-rw-rw-r-- 1 python_dev python_dev 110 Feb 26 11:19 pyvenv.cfg
drwxrwxr-x 3 python_dev python_dev 4096 Feb 26 11:19 share
> source venv/bin/activate
…
> deactivate
.
├── venv
├── setup.py # or main.py
├── src
└── tests
> sudo apt-get install cookiecutter
> pip install -U cookiecutter
> cookiecutter ssh://...cookiecutter_runtime_python_lib.git
project_name [Python Project]: sample_project
project_slug [new_project_2]: sample
version [0.0.1]:
uuaa []: ABCD
> ls -la
…
● Create an empty repository on Github / Bitbucket
● Setup branches
> cd sample
> git init
> # configure your upstream repository!
> git add -A
> git commit -m “Initial Commit”
> cd sample
> python -m venv venv
> source venv/bin/activate
http://cookiecutter-templates.sebastianruml.name/
2.
Don’t reinvent the wheel
● Python Package Index
https://pypi.python.org/pypi
● Custom repositories (host your own libraries)
Nexus
Artifactory
● Most used libraries
Python 3 Wall of Superpowers
● pip install <package>
● pip install --upgrade <package>
● pip uninstall <package>
● pip freeze
● pip freeze > requirements.txt
● pip install -r requirements.txt
https://pip.pypa.io/en/latest
> pip freeze > requirements.txt
> git add requirements.txt
> git commit -m “New Dependency”
3.
Choose your destiny
Check if there
are tickets for
El Hormiguero
TV show
Manage my
Fantasy Football
league
Let’s use the
TVs at DATIO!
Learn Python
Learn Python

Learn Python

  • 2.
  • 3.
  • 6.
    # sudo apt-getinstall python3-venv > pip3 install venv
  • 7.
    > mkdir -pnew_project > cd new_project > python3 -m venv venv > ls -l venv drwxrwxr-x 2 python_dev python_dev 4096 Feb 26 11:19 bin drwxrwxr-x 2 python_dev python_dev 4096 Feb 26 11:19 include drwxrwxr-x 3 python_dev python_dev 4096 Feb 26 11:19 lib lrwxrwxrwx 1 python_dev python_dev 3 Feb 26 11:19 lib64 -> lib -rw-rw-r-- 1 python_dev python_dev 110 Feb 26 11:19 pyvenv.cfg drwxrwxr-x 3 python_dev python_dev 4096 Feb 26 11:19 share > source venv/bin/activate … > deactivate
  • 8.
    . ├── venv ├── setup.py# or main.py ├── src └── tests
  • 10.
    > sudo apt-getinstall cookiecutter > pip install -U cookiecutter
  • 11.
    > cookiecutter ssh://...cookiecutter_runtime_python_lib.git project_name[Python Project]: sample_project project_slug [new_project_2]: sample version [0.0.1]: uuaa []: ABCD > ls -la …
  • 12.
    ● Create anempty repository on Github / Bitbucket ● Setup branches > cd sample > git init > # configure your upstream repository! > git add -A > git commit -m “Initial Commit”
  • 13.
    > cd sample >python -m venv venv > source venv/bin/activate
  • 14.
  • 17.
  • 18.
    ● Python PackageIndex https://pypi.python.org/pypi ● Custom repositories (host your own libraries) Nexus Artifactory ● Most used libraries Python 3 Wall of Superpowers
  • 19.
    ● pip install<package> ● pip install --upgrade <package> ● pip uninstall <package> ● pip freeze ● pip freeze > requirements.txt ● pip install -r requirements.txt https://pip.pypa.io/en/latest
  • 20.
    > pip freeze> requirements.txt > git add requirements.txt > git commit -m “New Dependency”
  • 21.
  • 23.
    Check if there aretickets for El Hormiguero TV show Manage my Fantasy Football league Let’s use the TVs at DATIO!