Topics


Pages


Content

Some useful commands, boilerplate code from my existing projects or things to use in new development.

Other cheatsheets

Installing dependencies and installing your package

It uses requirement.txt and pip which are the traditional/common choices. And setup.cfg as from my research that is also the popular/modern way to go. Use requirements-lock.txt if you care about subdependencies.

If you care about installing your project itself (not just its dependencies), so it can be installed by others for example, only then do you need to worry about setup.py.

See my installable package here:

Or

  • setup.py
      #!/usr/bin/env python
      """
      Install my-app.
      """
    
      import setuptools
    
      setuptools.setup()
    

Some tools like poetry need pyproject.toml.

And if using Pipenv then use Pipfile and Pipfile.lock.