Home | Trees | Index | Help |
|
---|
|
Extract API documentation about python objects by directly introspecting their values.
DocIntrospecter
is a processing class that
examines Python objects via introspection, and uses the information it
finds to create APIDoc objects containing the API documentation for
those objects.
DocIntrospecter
can be subclassed to extend the set of
object types that it supports.
|
|||
_DevNull | A "file-like" object that discards anything that is written and always reports end-of-file when read. |
|
|||
introspect_docs(value=None,
name=None,
filename=None,
context=None,
is_script=False)
Generate the API documentation for a specified object by introspecting Python values, and return it as a ValueDoc. |
|||
_get_valuedoc(value)
If a ValueDoc for the given value exists in the
valuedoc cache, then return it; otherwise, create a new
ValueDoc , add it to the cache, and return it.
|
|||
introspect_module(module,
module_doc,
preliminary=False)
Add API documentation information about the module module to module_doc .
|
|||
introspect_class(cls,
class_doc)
Add API documentation information about the class cls
to class_doc .
|
|||
introspect_routine(routine,
routine_doc)
Add API documentation information about the function routine to routine_doc (specializing it to
Routine_doc ).
|
|||
introspect_property(prop,
prop_doc)
Add API documentation information about the property prop to prop_doc (specializing it to
PropertyDoc ).
|
|||
introspect_other(val,
val_doc)
Specialize val_doc to a GenericValueDoc and return
it.
|
|||
unicode
|
get_docstring(value)
Return the docstring for the given value; or None if
it does not have a docstring.
|
||
DottedName or None
|
get_canonical_name(value) | ||
verify_name(value,
dotted_name)
Verify the name. |
|||
value_repr(value) | |||
DottedName |
get_containing_module(value)
Return the name of the module containing the given value, or None if the module name can't be determined.
|
||
module
|
_find_function_module(func) | ||
register_introspecter(applicability_test,
introspecter,
priority=10)
Register an introspecter function. |
|||
_get_introspecter(value) | |||
is_classmethod(v) | |||
is_staticmethod(v) | |||
is_property(v) | |||
get_value_from_filename(filename, context=None) | |||
get_value_from_scriptname(filename) | |||
get_value_from_name(name,
globs=None)
Given a name, return the corresponding value. |
|||
_lookup(module, name) | |||
_import(name,
filename=None)
Run the given callable in a 'sandboxed' environment. |
|||
introspect_docstring_lineno(api_doc)
Try to determine the line number on which the given item's docstring begins. |
|
|||
_valuedoc_cache | A cache containing the API documentation for values that we've already seen. | ||
_introspected_values | A record which values we've introspected, encoded as a dictionary
from pyid to bool . |
||
UNDOCUMENTED_MODULE_VARS | A list of module variables that should not be included in a module's API documentation. | ||
UNDOCUMENTED_CLASS_VARS | A list of class variables that should not be included in a class's API documentation. | ||
_introspecter_registry | |||
_dev_null |
|
value parameter, the filename parameter,
or the name parameter. (It is an error to specify
more than one of these three parameters, or to not specify any of
them.)
|
ValueDoc for the given value exists in the valuedoc
cache, then return it; otherwise, create a new ValueDoc , add
it to the cache, and return it. When possible, the new
ValueDoc 's pyval , repr , and
canonical_name attributes will be set appropriately.
|
module
to module_doc .
|
cls to
class_doc .
|
routine to routine_doc (specializing it to
Routine_doc ).
|
prop
to prop_doc (specializing it to
PropertyDoc ).
|
GenericValueDoc and return
it.
|
None if it
does not have a docstring.
|
|
|
|
None if the module name can't be determined.
|
|
ValueDoc object, and should
add information about the given value to the the ValueDoc .
Usually, the first line of an inspecter function will specialize it to a
sublass of ValueDoc , using ValueDoc.specialize_to():
>>> def typical_introspecter(value, value_doc):
... value_doc.specialize_to(SomeSubclassOfValueDoc)
... <add info to value_doc>
|
|
|
|
|
|
|
|
|
|
None if the line number
can't be determined. The line number of the first line in the file is
1.
|
|
_valuedoc_cacheA cache containing the API documentation for values that we've already seen. This cache is implemented as a dictionary that maps a value's pyid to its ValueDoc. Note that if we encounter a value but decide not to introspect it (because it's imported from another module), then_valuedoc_cache will contain an entry for the value, but the
value will not be listed in _introspected_values.
|
_introspected_valuesA record which values we've introspected, encoded as a dictionary from pyid tobool .
|
UNDOCUMENTED_MODULE_VARSA list of module variables that should not be included in a module's API documentation.
|
UNDOCUMENTED_CLASS_VARSA list of class variables that should not be included in a class's API documentation.
|
_introspecter_registry
|
_dev_null
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 3.0alpha2 on Tue Apr 11 17:30:11 2006 | http://epydoc.sf.net |