View on GitHub

FreeCAD Developers Handbook

A handbook about FreeCAD development

Python Practices #

Work in Progress - looking for help!

Naming conventions - PEP8 #

Using well known conventions makes easier for other developers to understand your code and maintain it in the future.

Namespacing #

Use proper namespacing to avoid conflicts with existing packages. It is preferred to put any FreeCAD code in a sub-module of the freecad base namespace.

Tooling #

Code formatting and linting #

Project management #

The modern tooling for python is uv, it replaces pip and manage dependencies, project metadata, virtual environments, etc… and it is 10x faster than pip.

uv Documentation

Typing #

Type hints makes the code safer and more easy to maintain and refactor.

There are many static type checkers:

Python versions #

Current supported python versions in FreeCAD are 3.10+, but some addons may not work with latest python versions.