How to make a Python package in 2021

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

CodeRabbit: AI Code Reviews for Developers
Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
coderabbit.ai
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  1. Poetry

    Python packaging and dependency management made easy

    Future-proof... Poetry 1.1 broke compatibility with 1.0. 1.1 lockfiles would crash Poetry 1.0, and 1.0 lockfiles would be thrown away by Poetry 1.1.

    It does not correctly verify hashes (if at all) [1]. You can't add packages without updating all your dependencies. Monorepos are not supported. PEP-508-compliant Git dependencies cause the tool to crash with TypeError [2].

    I think Poetry is the right solution, I use it for everything, but it's not the silver bullet you're painting it to be (yet). It's definitely not on par with Cargo, or maybe even npm.

    [1]: https://github.com/python-poetry/poetry/issues/3765

  2. CodeRabbit

    CodeRabbit: AI Code Reviews for Developers. Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.

    CodeRabbit logo
  3. vscode-python

    Python extension for Visual Studio Code

  4. Pipenv

    Python Development Workflow for Humans.

    I don't know anything about pipenv drama, so by morbid curiosity I looked for it and this is the first thing I saw:

    https://github.com/pypa/pipenv/issues/2228

    This is one of the most ridiculous issues I've read. If the rest of the "drama" is like that, then eh.

  5. flit

    Simplified packaging of Python modules

    I hadn't heard of flit, it does seem like it's not brand new on the scene, however it is primarily a single contributor:

    https://github.com/takluyver/flit/graphs/contributors

    With a title like this, I'd be expecting to see an article describing the latest tools and recommendations from the PyPA.

  6. hyper-inspector

    +1 for poetry. It also includes deterministic dependency resolution with a lock file.

    I just published a repo today[0] using Poetry and it didn’t take me more than 5 minutes. Poetry build && poetry publish

    [0] https://github.com/santiagobasulto/hyper-inspector

  7. laravel-websockets-example

    Quick example of a docker stack for laravel-websockets

    I rather just write a bash script. It's the lowest common denominator. Make may not be installed by default in many places and it has some weird syntax quirks that make it annoying to use IMO.

    Here's an example of how I like to do my "bash scripts that sorta work like make": https://github.com/francislavoie/laravel-websockets-example/... basically each function is a "command", so I do like "./utils start" or whatever.

  8. python-lib

    Opinionated cookiecutter template for creating a new Python library

    I have a cookiecutter template for this at https://github.com/simonw/python-lib (also click-app and datasette-plugin)

    It sets up GitHub actions for publishing the package to PyPI when you create a release on GitHub - which I find way to be a really productive way of working.

  9. SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  10. pip

    The Python package installer

  11. virtualenv

    Virtual Python Environment builder

  12. Django

    The Web framework for perfectionists with deadlines.

    Also automatcially handles the issue of public vs private etc. Note this [1] recommends using zip files for speed, especially for larger repositories:

        pip install https://github.com/django/django/archive/master.zip

  13. python-template

    A simple template Python repository which describes a workflow and set of tools, to make group projects more manageable (by alknemeyer)

    Somewhat related: I have an example repository which I've been using to keep track of the tools I use, aimed at people in a research lab who are relatively new to Python. I made it because the existing example/template repositories I found don't gel nicely with the way I like to set up and think about things. Here it is -- hope you find it useful:

    https://github.com/alknemeyer/python-template/

  14. sampleproject

    A sample project that exists for PyPUG's "Tutorial on Packaging and Distributing Projects"

  15. myproject

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Managing dependencies - pipenv?

    1 project | /r/learnpython | 20 Sep 2023
  • Renaming folders is usually a bad idea right?

    1 project | /r/djangolearning | 16 Jan 2023
  • Why does Pipenv install do the same thing as Pipenv install --ignore-pipfile

    1 project | /r/learnpython | 14 Oct 2022
  • pipenv integration with neovim

    2 projects | /r/neovim | 5 Oct 2022
  • Top 10 Python security best practices

    1 project | dev.to | 9 Aug 2022

Did you know that Python is
the 2nd most popular programming language
based on number of references?