Skip to content

Python Project Structure Glossary

How professional Python projects are organized.

Project

A structured set of files and folders that work together to run code, store data, and produce outputs.

src/ Layout

A project structure where all package code lives inside a src/ folder. Keeps source code separate from configuration, data, and documentation. Example structure:

project-name/
├── src/
│   └── packagename/
│       ├── __init__.py
│       └── analytics.py
├── data/
├── artifacts/
├── docs/
├── pyproject.toml
└── README.md

data/

The folder containing input data files (example: CSV files). Files here are read by the program but never modified by it.

artifacts/

The folder containing output files generated by the program. Examples: output CSVs, plots, reports. Never manually edit files in this folder, these folders and files are always generated by code.

docs/

The folder containing project documentation written in Markdown. Examples: glossary.md, skills.md, data_dictionary.md.

pyproject.toml

The project configuration file defining metadata, dependencies, and tool settings. See glossary-environment-tools.md for full definition.

README.md

The front-page document of the project, displayed on GitHub. Explains what the project does, how to run it, and what outputs to expect.

init.py

An empty or minimal Python file that marks a folder as a Python package, making it importable.


Starter File

A partially completed file to finish. Typically named with a placeholder: yourname_logic.py. Rename it using your name/alias/identifier before editing.

Example File

A working example provided by the course demonstrating correct structure and behavior. Example: case_logic.py Read and understand the example file before writing your own.

Rename

Changing a file's name to use your name/alias/identifier while keeping its structure. Example: rename yourname_logic.py to smith_logic.py.


Data Dictionary

A description of dataset columns: names, data types, units, and valid values. Typically stored in docs/data_dictionary.md. Always read the data dictionary before analyzing a dataset.

Input Data

Data files read by the program at runtime, stored in data/. The program reads these but does not modify them.

Output Artifact

A file generated and written by the program, stored in artifacts/. Examples: filtered CSV, summary CSV, plot image, log file.

Documentation (docs/)

Markdown files that explain the project for human readers.