Liberator is a Python library that "liberates" (i.e. statically extracts) class / function source code from an existing python library into a single standalone module.
It works by statically parsing the code for the class / function definition and then recursively parsing and extracting all missing dependencies.
..The main webpage for this project is: https://gitlab.kitware.com/python/liberator