How do you decide when to keep a project in a single python file vs break it up into multiple files?

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

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

    Apache Airflow - A platform to programmatically author, schedule, and monitor workflows

  • Check out taskinstance.py in the Airflow project, it's a well targeted file, it has only one main class TaskInstance and a few small supporting classes and functions. It is ~3000 lines long: https://github.com/apache/airflow/blob/main/airflow/models/taskinstance.py

  • MicroPython

    MicroPython - a lean and efficient Python implementation for microcontrollers and constrained systems

  • boot.py and main.py comes from Micropython.

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

    A simple, yet elegant, HTTP library.

  • The requests package has been the golden standard for package structure for as long as I can remember.

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