====== Python ====== ===== General ===== * [[https://www.fullstackpython.com/|Full Stack Python]] * [[https://www.pyinstaller.org/|PyInstaller]] * [[https://github.com/pyenv/pyenv#simple-python-version-management-pyenv|Simple Python Version Management: pyenv]] * [[https://www.marc-richter.info/using-pyenv-to-manage-your-python-interpreters/|Using pyenv to manage your Python interpreters]] ===== Package Management and Virtual Environments ===== * [[https://docs.python.org/3/library/venv.html|venv]] * [[https://python-poetry.org/|Poetry]] * Pipenv * [[https://docs.pipenv.org/install/|Installing Pipenv]] * [[https://pipenv-fork.readthedocs.io/en/latest/basics.html|Basic Usage of Pipenv]] * PIP * [[https://pip.pypa.io/en/stable/user_guide/#user-installs|pip User Guide, User Installs]]: ''pip install %%--%%user SomePackage'' * Pip behind a proxy * Explicitly specify proxy: ''pip %%--%%proxy=http://user:password@proxy.example.com:12345 some-package'' * Using environment varialbes * ''HTTP_PROXY=http://user:password@proxy.example.com:12345'' * ''HTTPS_PROXY=http://user:password@proxy.example.com:12345'' * ''pip install some-package'' ==== Without pip ==== If pip is not available, package can be placed manually inside the Python site folder. Find out the Python site folder: ''python -m site %%--%%user-site'' This returns something like ''C:\Users\[USERNAME]\AppData\Roaming\Python\Python37\site-packages'' or ''/home/[USERNAME]/.local/lib/python2.6/site-packages''. The source of the package can then be placed within this folder. Packages consisting of only one file can be placed directly under site-packages with the respective package name. Packages containing of multiple files can be placed within a subfolder named according to the package, e.g. ''smb''. The package main file would then be the ''__init__.py'' within the ''smb'' folder. ===== Packaging ===== * [[https://packaging.python.org/overview/|Packaging overview]] * [[https://packaging.python.org/tutorials/packaging-projects/|Simple project structure]] * [[https://www.fullstackpython.com/application-dependencies.html|Application Dependencies]] * [[https://docs.python-guide.org/writing/structure/|Structuring Your Project – The Hitchhiker's Guide to Python]] * [[https://python-packaging.readthedocs.io/en/latest/index.html|How To Package Your Python Code]] * [[https://www.digitalocean.com/community/tutorials/how-to-package-and-distribute-python-applications|How To Package And Distribute Python Applications – DigitalOcean]] ===== Logging ===== * [[https://docs.python.org/3/library/logging.html|Logging]] * [[https://docs.python.org/3/howto/logging.html|Logging HOWTO]] * [[https://docs.python.org/3/howto/logging-cookbook.html|Logging Cookbook]] * [[https://docs.python-guide.org/writing/logging/|Logging – The Hitchhiker's Guide to Python]] ===== Packages ===== * [[https://pypi.org/project/pip-licenses/|pip-licenses]]: Dump the software license list of Python packages installed with pip. * [[https://pysmb.readthedocs.io/en/latest/api/smb_SMBConnection.html|pysmb]] for accessing SMB/Samba network shares * [[https://fastapi.tiangolo.com/|FastAPI]] for creating APIs in Python ===== Miscellaneous ===== * [[http://skybert.net/python/developing-a-restful-micro-service-in-python/|Developing a RESTful micro service in Python]]