The main challenge is the size of the API: there are hundreds of endpoints with one to six HTTP verbs each. PyGithub provides a specialized interface for each combination; this makes client code safe. Some other libraries let their user write the name of the endpoints: mistakes are only discovered when the HTTP request is sent. In PyGithub, if the method exists, then the endpoint exists.
Its core functionality is written in C++ and exposed as a Python library using Boost.Python. A Python callback for computing the colors is called from the C++ code. This required two-way integration of C++ and Python code. Drawings are made using Cairo. The Cairo context is created in Python using PyCairo and passed to the C++ layer. The C++ code uses Cairomm to do the actual drawing.
To ensure that side-effects from an action don’t affect others, it uses Python’s multiprocessing module to launch each action in its own subprocess.
Its main added value is that decorated functions keep their signature, so tools doing introspection (Sphinx doc, IDEs, etc.) will work like there is no decorator.
The wrapper function is generated using Python’s ast module.
This avoids using
eval on generated code.