interface_gen/interface_gen library

Classes

AnyTypePrimitive
A special primitive type that represents any type.
ClassDefinition
Representation of a Python class definition.
ClassInstance
Representation of a Python class instance.
Function_
Representation of a Python function.
InspectEntry
Base class for inspect entries.
InspectEntryModuleConnection
Connects an inspect entry to a module in which it is defined or imported.
InspectionCache
Cache for inspection results. This is used to deal with circular references in inspected Python modules.
InstantiatedClassDefinition
Instantiated version of a ClassDefinition. This pins the class to a specific module.
InstantiatedClassInstance
Instantiated version of ClassInstance. This pins the class to a specific module.
InstantiatedFunction_
Instantiated version of Function_. This pins the function to a specific module.
InstantiatedInspectEntry
Base class for instantiated inspect entries.
InstantiatedMethod
TODO: Document.
InstantiatedModule
Instantiated version of Module. This pins the module to a specific module.
InstantiatedObject_
Instantiated version of Object_.
Method
TODO: Document.
Module
Representation of a Python module.
Object_
Representation of a Python object.
ObjInfo
Holds information about an inspected object.
Primitive
Representation of a primitive value. This is a value that is not an instance of PythonObject, but directly mapped to a Dart type.

Enums

InspectEntryType
Represents the inspection entries' type.

Mixins

FunctionFieldMixin
Emits all fields of a class or module that are a function or method.
GetterSetterMixin
TODO: Document.
GettersSettersMixin
TODO: Document.
InspectMixin
Shared implementation of InspectEntrys.
InstantiatedInspectMixin
Shared implementation of InstantiatedInspectEntrys.

Extensions

Extension on Iterable<E>
Utility extension methods for operations on Iterables.
IntersectExtension on Set<E>
Utility extension methods for set operations on Iterables.
MergeExtension on Iterable<E>
Utility extension methods for merge operations on Iterables.

Functions

doInspection(PythonModuleDefinition? moduleDefinition, {required String moduleName, required AppType appType, required InspectionCache cache, required String stdlibPath, required bool dump, String parentModulePrefix = ""}) Future<String?>
Inspects a Python module for interface generation.
emitInspection(InspectionCache cache, {required AppType appType, bool primaryModuleOnly = true, String moduleParentPrefix = ""}) String
Emits Dart source code of the generated interface definitions.
sanitizeName(String name, {Set<String> extraKeywords = const <String>{}}) String
Transforms a Python identifier into the closest possible legal Dart identifier by prepending a $ character. Dart keywords and built-in types are respected. As an example, a Python function called get will be turned into $get in Dart.

Typedefs

Transform = String Function(String)
Type alias for a type string transform.