Ask HN: Good Python projects to read for modern Python?

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

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • rich

    Rich is a Python library for rich text and beautiful formatting in the terminal.

    at the end of module files? Never seen that, why is it used? I understand that it's a guard that only runs when the module is executed directly, but what is the code put there? For developers to quickly visually test stuff by running the module?

    Here, for example https://github.com/willmcgugan/rich/blob/master/rich/color.p...

  • pydantic

    Data validation using Python type hints

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

  • Sentry

    Developer-first error tracking and performance monitoring

  • geospatial-data-lake

    Discontinued Central storage, management and access for important geospatial datasets

    I'd recommend a project from work, Geostore[1]. Highlights:

    - 100% test coverage (with some typical exceptions like `if __name__ == "__main__":` blocks)

    - Randomises test sequence and inputs reproducibly

    - Passes Pylint with max McCabe complexity of 6

    - Passes `mypy --strict`

    - Formatted using Black and isort

    [1] https://github.com/linz/geostore

  • gpiozero

    A simple interface to GPIO devices with Raspberry Pi

  • pytudes

    Python programs, usually short, of considerable difficulty, to perfect particular skills.

    Norvig's approach of converting thoughts into a program is what you need to focus on. It is trivial to convert a list comprehension into a loop.

    In "When is Cheryl's birthday?" [1], the way he converts the problem into functional units is insane. A couple of list comprehensions shouldn't scare you. Look above and beyond the details.

    [1] https://github.com/norvig/pytudes/blob/main/ipynb/Cheryl.ipy...

  • Installation

    The premier source of truth powering network automation. Open source under Apache 2. Public demo: https://demo.netbox.dev

    NetBox[0] is a large project that does this.

    https://github.com/netbox-community/netbox

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

  • fastapi-azure-auth

    Easy and secure implementation of Azure Entra ID (previously AD) for your FastAPI APIs 🔒 B2C, single- and multi-tenant support.

    I think, in general, most FastAPI and Pydantic related libraries are heavily typed, use poetry, GitHub pipelines, black, isort, flake8 etc. so if you want to look at the ecosystem around a package I’ll recommend a few here, that has a smaller scope than the huge libraries Pydantic/FastAPI are. All packages listed below has all these things.

    FastAPI-Azure-Auth [0] is a library to do authentication and authorization through Azure AD using tokens.

    ASGI—Correlation-ID[1] is a package that utilizes contextvars to store information through the asyncio stack, in order to attach correlation/request ID to every log message from a request. Available for Django in [2].

    Pydantic-factories [3] is an awesome library to mock data for your pydantic models.

    [0] https://github.com/Intility/fastapi-azure-auth

  • asgi-correlation-id

    Request ID propagation for ASGI apps

  • django-guid

    Inject an ID into every log message from a Django request. ASGI compatible, integrates with Sentry, and works with Celery

  • pydantic-factories

    Discontinued Simple and powerful mock data generation using pydantic or dataclasses

  • PDM

    A modern Python package and dependency manager supporting the latest PEP standards

    Here's a few that haven't been mentioned yet:

    - PDM: A modern Python package manager with PEP 582 support[1]

    - Spleeter: Deezer source separation library including pretrained models[2]

    ---

    [0]: https://github.com/pdm-project/pdm

    [1]: https://github.com/deezer/spleeter

  • spleeter

    Deezer source separation library including pretrained models.

    Here's a few that haven't been mentioned yet:

    - PDM: A modern Python package manager with PEP 582 support[1]

    - Spleeter: Deezer source separation library including pretrained models[2]

    ---

    [0]: https://github.com/pdm-project/pdm

    [1]: https://github.com/deezer/spleeter

  • Bottle

    bottle.py is a fast and simple micro-framework for python web-applications.

  • SaaSHub

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

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