ADACS Logo

Python 3.13 Documentation Status MIT License

Base Python Codebase Template

Starting a new Python codebase? Read on to see how this template can have you set-up with all the elements of a professional codebase in less than 30 mins.

Getting Started

Installing the needed dependencies and building your new project is easy with the following steps …

Make sure Cookiecutter is installed

pip install cookiecutter

(or better yet, use pipx)

pipx install cookiecutter

Make sure Poetry is installed

Use the official installer

curl -sSL https://install.python-poetry.org | python3 -

(or better yet, use pipx)

pipx install poetry

Render the project

Run cookiecutter on the template’s repository:

cookiecutter gh:ADACS-Australia/adacs_template_python_base

and answer the questions:

ADACS Python Template Questions

Install the new project

Create and activate a new virtual environment for Python >= 3.13 using your preferred method (e.g. python -m venv .venv && source .venv/bin/activate, or via pyenv, conda, etc.) and install the project by running the following in the new repo directory:

poetry install

Configure the services you need

Follow these instructions to configure GitHub, Read the Docs, PyPI, etc.

What do you get for this?

A codebase that eases collaboration and automatically:

  • Ensures that all code on the main branch and released versions:

    • builds correctly (including documentation) and passes all unit tests

    • conforms to the project’s code formatting and linting policies

    • is properly versioned

  • And optionally, automates the following for new releases of your project:

    • publication to PyPI so people can easilly install it

    • publication of updated documentation to Read the Docs

Other ADACS Python templates can then be applied to this base template to quickly kickstart a new project.