Contribute to the code

For a run-through of the entire process, the following pages will be your best starting point:

On the rest of this page you’ll find the key resources you’ll need to start contributing to the cloud-init codebase.

Testing

Submissions to cloud-init must include testing. Unit testing and integration testing are integral parts of contributing code.

Code style and design

We generally adhere to PEP 8, and this is enforced by our use of black, isort and ruff.

Python support

Cloud-init upstream currently supports Python 3.8 and above.

Cloud-init upstream will stay compatible with a particular Python version for 6 years after release. After 6 years, we will stop testing upstream changes against the unsupported version of Python and may introduce breaking changes. This policy may change as needed.

The following table lists the cloud-init versions in which the minimum Python version changed:

Cloud-init version

Python version

24.3

3.8+

22.1

3.6+

20.3

3.5+

19.4

2.7+

Type annotations

The cloud-init codebase uses Python’s annotation support for storing type annotations in the style specified by PEP-484 and PEP-526. Their use in the codebase is encouraged.