package documentation

Undocumented

Module __main__ Undocumented

From __init__.py:

Class ​Api​Object The base class for representing "API Objects". Any API object is any addressable entity in code, be that a variable/constant, function, class or module.
Class ​Argument Represents a #Function argument.
Class ​Class Represents a class definition.
Class ​Data Represents a variable assignment (e.g. for global variables (often used as constants) or class members).
Class ​Decoration Represents a decorator on a #Class or #Function.
Class ​Docstring Represents a docstring for an #APIObject, i.e. it's content and location. This class is a subclass of str for backwards compatibility reasons. Use the #content property to access the docstring content over the #Docstring value directory.
Class ​Function Represents a function definition. This can be in a #Module for plain functions or in a #Class for methods. The #decorations need to be introspected to understand if the function has a special purpose (e.g. is it a @property, @classmethod or @staticmethod?).
Class ​Has​Members Base class for API objects that can have members, e.g. #Class and #Module.
Class ​Indirection Represents an imported name. It can be used to properly find the full name target of a link written with a local name.
Class ​Location Represents the location of an #ApiObject by a filename and line number.
Class ​Module Represents a module, basically a named container for code/API objects. Modules may be nested in other modules. Be aware that for historical reasons, some loaders lile #docspec_python by default do not return nested modules, even if nesting would be appropriate (and instead the #Module.name simply contains the fully qualified name).
Class ​Reverse​Map Reverse map for finding the parent of an #ApiObject.
Function dump​_module Dumps a module to the specified target or returns it as plain structured data.
Function filter​_visit Visits all objects recursively, applying the predicate in the specified order. If the predicate returrns #False, the object will be removed from it's containing list.
Function get​_member Generic function to retrieve a member from an API object. This will always return #None for objects that don't support members (eg. #Function and #Data).
Function load​_module Loads a #Module from the specified source, which may be either a filename, a file-like object to read from or plain structured data.
Function load​_modules Loads a stream of modules from the specified source. Similar to #load_module(), the source can be a filename, file-like object or a list of plain structured data to deserialize from.
Function visit Visits all objects, applying func in the specified order.
Variable __author__ Undocumented
Variable __version__ Undocumented
Variable _​Members Undocumented
Variable _​Member​Type Undocumented
Variable _​Module​Members Undocumented
Variable _​Module​Member​Type Undocumented
__author__: str =

Undocumented

__version__: str =

Undocumented

_Members =

Undocumented

_MemberType =

Undocumented

_ModuleMembers =

Undocumented

_ModuleMemberType =

Undocumented

def load_module(source, filename=None, loader=json.load):

Loads a #Module from the specified source, which may be either a filename, a file-like object to read from or plain structured data.

# Arguments source: The JSON source to load the module from. filename: The name of the source. This will be displayed in error

messages if the deserialization fails.
loader: A function for loading plain structured data from a file-like
object. Defaults to #json.load().

# Returns The loaded Module object.

Parameters
source:t.Union[str, t.TextIO, t.Dict[str, t.Any]]Undocumented
filename:t.Optional[str]Undocumented
loader:t.Callable[[t.IO[str]], t.Any]Undocumented
Returns
ModuleUndocumented
def load_modules(source, filename=None, loader=json.load):
Loads a stream of modules from the specified source. Similar to #load_module(), the source can be a filename, file-like object or a list of plain structured data to deserialize from.
Parameters
source:t.Union[str, t.TextIO, t.Iterable[t.Any]]Undocumented
filename:t.Optional[str]Undocumented
loader:t.Callable[[t.IO[str]], t.Any]Undocumented
Returns
t.Iterable[Module]Undocumented
def dump_module(module, target=None, dumper=json.dump):
Dumps a module to the specified target or returns it as plain structured data.
Parameters
module:ModuleUndocumented
target:t.Optional[t.Union[str, t.IO[str]]]Undocumented
dumper:t.Callable[[t.Any, t.IO[str]], None]Undocumented
Returns
t.Optional[t.Dict[str, t.Any]]Undocumented
def filter_visit(objects, predicate, order='pre'):

Visits all objects recursively, applying the predicate in the specified order. If the predicate returrns #False, the object will be removed from it's containing list.

If an object is removed in pre-order, it's members will not be visited.

Parameters
objects:t.List[ApiObject]A list of objects to visit recursively. This list will be modified if the predicate returns #False for an object.
predicate:t.Callable[[ApiObject], bool]The function to apply over all visited objects.
order:strThe order in which the objects are visited. The default order is 'pre' in which case the predicate is called before visiting the object's members. The order may also be 'post'.
Returns
t.List[ApiObject]Undocumented
def visit(objects, func, order='pre'):
Visits all objects, applying func in the specified order.
Parameters
objects:t.List[ApiObject]Undocumented
func:t.Callable[[ApiObject], t.Any]Undocumented
order:strUndocumented
def get_member(obj, name):
Generic function to retrieve a member from an API object. This will always return #None for objects that don't support members (eg. #Function and #Data).
Parameters
obj:ApiObjectUndocumented
name:strUndocumented
Returns
t.Optional[ApiObject]Undocumented