What're the cleanest, most beautifully written projects in Github that are worth studying the code?

This page summarizes the projects mentioned and recommended in the original post on /r/Python

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

    The Python programming language

  • https://github.com/python/cpython/blob/3.10/Lib/base64.py https://github.com/python/cpython/blob/3.10/Lib/datetime.py https://github.com/python/cpython/blob/3.10/Lib/configparser.py

  • black

    The uncompromising Python code formatter

  • I'd definitely recommend exploring a bit and checking out the tests and some of the other good stuff they have there, but if you just want to read the main source for Black, check out this directory.

  • 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.

    WorkOS logo
  • rich

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

  • Rich by @willm

  • pytudes

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

  • Norvig's pytudes

  • requests

    A simple, yet elegant, HTTP library.

  • Requests comes up quite often in these discussions.

  • click

    Python composable command line interface toolkit

  • starlette

    The little ASGI framework that shines. 🌟

  • Starlette on the other hand is quite nice and simple: [e.g. this file](https://github.com/encode/starlette/tree/master/starlette)

  • 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.

    InfluxDB logo
  • Bottle

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

  • Raymond Hettinger recommended bottle in one of his talks for exactly this reason, https://github.com/bottlepy/bottle

  • Nox

    Flexible test automation for Python

  • I'm biased, but Nox is pretty well organized, documented, and commented.

  • AxieRoninBot

  • perhaps a little specific and more on the applied side (NFT game: axie infinity), but as a noob starting with web3 etc., I found the code in this little repo to be amazingly well written, especially it's "main.py":

  • AIOHTTP

    Asynchronous HTTP client/server framework for asyncio and Python

  • Better yet, aiohttp.

  • pytermgui

    Python TUI framework with mouse support, modular widget system, customizable and rapid terminal markup language and more!

  • I might be biased, but I like to think my library PyTermGUI is pretty good looking, as it's formatted with black and commits have to get a 10.0 Pylint score to be pushed, as well as pass Mypy with no errors.

  • my_first_calculator.py

    my_first_calculator.py

  • This calculator is a masterpiece

  • Toolz

    A functional standard library for Python.

  • PyFilesystem2

    Python's Filesystem abstraction layer

  • Pyfilesytem2 is pretty swell. Also a big fan of nox.

  • jina

    ☁️ Build multimodal AI applications with cloud-native stack

  • Jina, python library to implement deep-learning powered search. Checkout how a complex thing is simplified with just 3 basic concepts - Document, DocumentArray and Executor

  • starlite

    Discontinued Light, Flexible and Extensible ASGI API framework | Effortlessly Build Performant APIs [Moved to: https://github.com/litestar-org/litestar]

  • mypyc

    Compile type annotated Python to fast C extensions

  • Well part of that is because I spent a summer stuck in quarantine getting Black compiled with [mypyc](https://github.com/mypyc/mypyc), it overall speeds up Black 2x.

  • django-logpipe

    Automated mirror of https://gitlab.com/thelabnyc/django-logpipe

  • There are plenty of python projects on github. here is some of my favourite ones django-logpipe!, zulip!, unleash!, edx-platform!, sentry!

  • Zulip

    Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

  • There are plenty of python projects on github. here is some of my favourite ones django-logpipe!, zulip!, unleash!, edx-platform!, sentry!

  • unleash

    Open-source feature management solution built for developers.

  • There are plenty of python projects on github. here is some of my favourite ones django-logpipe!, zulip!, unleash!, edx-platform!, sentry!

  • edX

    The Open edX LMS & Studio, powering education sites around the world!

  • There are plenty of python projects on github. here is some of my favourite ones django-logpipe!, zulip!, unleash!, edx-platform!, sentry!

  • Sentry

    Developer-first error tracking and performance monitoring

  • There are plenty of python projects on github. here is some of my favourite ones django-logpipe!, zulip!, unleash!, edx-platform!, sentry!

  • pyodbc

    Python ODBC bridge

  • Since I have been dabbling with databases for more than 20 years in perl, java, c and python. I recommend the pyodbc project, it really show you how to bind c-prog to get them into python and just look at the beautiful setup file: https://github.com/mkleehammer/pyodbc/blob/master/setup.py

  • SaaSHub

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

    SaaSHub logo
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