Daniel Hepper
PyCologne, January 2018
- Package: a directory with a __init__.py file and a bunch of submodules
- Distribution: intended to be shared, has a setup.py, downloaded from PyPI
- Library: not useful on its own
- Project: might be distributed
compatibility > maintainability > reprocability
reproducability > maintainability> compatiblity
Libraries must define their dependencies in setup.py, setup.py is not sufficient for Projects
setup(
...
install_requires=[
'chardet>=3.0.2,<3.1.0',
'idna>=2.5,<2.7',
'urllib3>=1.21.1,<1.23',
'certifi>=2017.4.17'
],
)
$ virtualenv myproject
$ source myproject/bin/activate
(myproject) $ pip install requests
(myproject) $ pip freeze > requirements.txt
(myproject) $ cat requirements.txt
certifi==2017.11.5
chardet==3.0.4
idna==2.6
requests==2.18.4
urllib3==1.22
Aims to bring the best from other language's package handling to Python
See talk by Chris Arndt: https://github.com/SpotlightKid/talk-requirements-revisited
https://pypi.python.org/pypi/pipenv
| Table of contents | t |
|---|---|
| Exposé | ESC |
| Autoscale | e |
| Full screen slides | f |
| Presenter view | p |
| Source files | s |
| Slide numbers | n |
| Blank screen | b |
| Notes | 2 |
| Help | h |