abseil-py API reference
110 public APIs from abseil-py (abseil/abseil-py) — 36 classes, 30 functions, 44 methods. Signatures extracted by static analysis of the actual source.
Repository: abseil/abseil-py
| Kind | Count |
|---|---|
| Classes | 36 |
| Functions | 30 |
| Methods | 44 |
API list
class
absl.app.ExceptionHandlerBase exception handler from which other may inherit.
method
absl.app.ExceptionHandler.handle(exc)Do something with the current exception.
class
absl.app.HelpFlagSpecial boolean flag that displays usage and raises SystemExit.
class
absl.app.HelpXMLFlagSimilar to HelpfullFlag, but generates output in XML format.
class
absl.app.HelpshortFlag--helpshort is an alias for --help.
class
absl.app.OnlyCheckFlagsFlagSimilar to HelpFlag, but only checks flag definitions.
func
absl.app.define_help_flags()Registers help flags.
func
absl.app.install_exception_handler(handler)Installs an exception handler.
func
absl.app.run(main, argv=None, flags_parser=parse_flags_with_usage)Begins executing the program.
func
absl.command_name.set_kernel_process_name(name:str | bytes) -> NoneChanges the Kernel's /proc/self/status process name on Linux.
class
absl.flags._argument_parser.ArgumentParserBase class used to parse and convert arguments.
method
absl.flags._argument_parser.ArgumentParser.flag_type() -> strReturns a string representing the type of the flag.
method
absl.flags._argument_parser.ArgumentParser.parse(argument:str) -> _T | NoneParses the string argument and returns the native value.
class
absl.flags._argument_parser.BaseListParserBase class for a parser of lists of strings.
method
absl.flags._argument_parser.BaseListParser.flag_type() -> strSee base class.
method
absl.flags._argument_parser.BaseListParser.parse(argument:str) -> list[str]See base class.
class
absl.flags._argument_parser.BooleanParserParser of boolean values.
method
absl.flags._argument_parser.BooleanParser.flag_type() -> strSee base class.
method
absl.flags._argument_parser.BooleanParser.parse(argument:str | int) -> boolSee base class.
class
absl.flags._argument_parser.EnumClassListSerializerA serializer for :class:`MultiEnumClass` flags.
method
absl.flags._argument_parser.EnumClassListSerializer.serialize(value:_ET | list[_ET]) -> strSee base class.
class
absl.flags._argument_parser.EnumClassParserParser of an Enum class member.
method
absl.flags._argument_parser.EnumClassParser.flag_type() -> strSee base class.
method
absl.flags._argument_parser.EnumParser.flag_type() -> strSee base class.
class
absl.flags._argument_parser.FloatParserParser of floating point values.
method
absl.flags._argument_parser.FloatParser.convert(argument:int | float | str) -> floatReturns the float value of argument.
method
absl.flags._argument_parser.FloatParser.flag_type() -> strSee base class.
class
absl.flags._argument_parser.IntegerParserParser of an integer value.
method
absl.flags._argument_parser.IntegerParser.convert(argument:int | str) -> intReturns the int value of argument.
method
absl.flags._argument_parser.IntegerParser.flag_type() -> strSee base class.
class
absl.flags._argument_parser.ListParserParser for a comma-separated list of strings.
method
absl.flags._argument_parser.ListParser.parse(argument:str | list[str]) -> list[str]Parses argument as comma-separated list of strings.
class
absl.flags._argument_parser.NumericParserParser of numeric values.
method
absl.flags._argument_parser.NumericParser.convert(argument:str | _N) -> _NReturns the correct numeric value of argument.
method
absl.flags._argument_parser.NumericParser.is_outside_bounds(val:_N) -> boolReturns whether the value is outside the bounds or not.
method
absl.flags._argument_parser.NumericParser.parse(argument:str | _N) -> _NSee base class.
class
absl.flags._argument_parser.WhitespaceSeparatedListParserParser for a whitespace-separated list of strings.
func
absl.flags._defines.declare_key_flag(flag_name:str | _flagvalues.FlagHolder, flag_values:_flagvalues.FlagValues=_flagvalues.FLAGS) -> NoneDeclares one flag as key to the current module.
func
absl.flags._defines.override_value(flag_holder:_flagvalues.FlagHolder[_T], value:_T) -> NoneOverrides the value of the provided flag.
func
absl.flags._defines.set_default(flag_holder:_flagvalues.FlagHolder[_T], value:_T) -> NoneChanges the default value of the provided flag object.
class
absl.flags._exceptions.CantOpenFlagFileErrorRaised when flagfile fails to open.
class
absl.flags._exceptions.DuplicateFlagErrorRaised if there is a flag naming conflict.
class
absl.flags._exceptions.ErrorThe base class for all flags errors.
class
absl.flags._exceptions.IllegalFlagValueErrorRaised when the flag command line argument is illegal.
class
absl.flags._exceptions.UnrecognizedFlagErrorRaised when a flag is unrecognized.
class
absl.flags._exceptions.ValidationErrorRaised when flag validator constraint is not satisfied.
class
absl.flags._flag.BooleanFlagBasic boolean flag.
class
absl.flags._flag.EnumClassFlagBasic enum flag; its value is an enum class's member.
class
absl.flags._flag.FlagInformation about a command-line flag.
method
absl.flags._flag.Flag.flag_type() -> strReturns a str that describes the type of the flag.
method
absl.flags._flag.Flag.parse(argument:str | _T) -> NoneParses string and sets flag value.
method
absl.flags._flag.Flag.serialize() -> strSerializes the flag.
class
absl.flags._flag.MultiEnumClassFlagA multi_enum_class flag.
class
absl.flags._flag.MultiFlagA flag that can appear multiple time on the command-line.
method
absl.flags._flag.MultiFlag.flag_type()See base class.
class
absl.flags._flagvalues.FlagHolderHolds a defined flag.
method
absl.flags._flagvalues.FlagHolder.default() -> _T_coReturns the default value of the flag.
method
absl.flags._flagvalues.FlagHolder.serialize() -> strReturns a serialized representation of the flag.
method
absl.flags._flagvalues.FlagHolder.value() -> _T_coReturns the value of the flag.
class
absl.flags._flagvalues.FlagValuesRegistry of :class:`~absl.flags.Flag` objects.
method
absl.flags._flagvalues.FlagValues.append_flag_values(flag_values:'FlagValues') -> NoneAppends flags registered in another FlagValues instance.
method
absl.flags._flagvalues.FlagValues.get_flag_value(name:str, default:Any) -> AnyReturns the value of a flag (if not None) or a default value.
method
absl.flags._flagvalues.FlagValues.get_flags_for_module(module:str | Any) -> list[Flag]Returns the list of flags defined by a module.
method
absl.flags._flagvalues.FlagValues.get_help(prefix:str='', include_special_flags:bool=True) -> strReturns a help string for all known flags.
method
absl.flags._flagvalues.FlagValues.get_key_flags_for_module(module:str | Any) -> list[Flag]Returns the list of key flags for a module.
method
absl.flags._flagvalues.FlagValues.is_parsed() -> boolReturns whether flags were parsed.
method
absl.flags._flagvalues.FlagValues.main_module_help() -> strDescribes the key flags of the main module.
method
absl.flags._flagvalues.FlagValues.mark_as_parsed() -> NoneExplicitly marks flags as parsed.
method
absl.flags._flagvalues.FlagValues.module_help(module:Any) -> strDescribes the key flags of a module.
method
absl.flags._flagvalues.FlagValues.register_flag_by_module(module_name:str, flag:Flag) -> NoneRecords the module that defines a specific flag.
method
absl.flags._flagvalues.FlagValues.register_flag_by_module_id(module_id:int, flag:Flag) -> NoneRecords the module that defines a specific flag.
method
absl.flags._flagvalues.FlagValues.register_key_flag_for_module(module_name:str, flag:Flag) -> NoneSpecifies that a flag is a key flag for a module.
method
absl.flags._flagvalues.FlagValues.set_default(name:str, value:Any) -> NoneChanges the default value of the named flag object.
method
absl.flags._flagvalues.FlagValues.set_gnu_getopt(gnu_getopt:bool=True) -> NoneSets whether or not to use GNU style scanning.
method
absl.flags._flagvalues.FlagValues.validate_all_flags() -> NoneVerifies whether all flags pass validation.
method
absl.flags._flagvalues.FlagValues.write_help_in_xml_format(outfile:TextIO | None=None) -> NoneOutputs flag documentation in XML format.
class
absl.flags._flagvalues.ReloadDetectorHelper class for detecting reloads.
func
absl.flags._flagvalues.resolve_flag_ref(flag_ref:str | FlagHolder, flag_values:FlagValues) -> tuple[str, FlagValues]Helper to validate and resolve a flag reference argument.
func
absl.flags._helpers.create_xml_dom_element(doc:minidom.Document, name:str, value:Any) -> minidom.ElementReturns an XML DOM element with name and text value.
func
absl.flags._helpers.doc_to_help(doc:str) -> strTakes a __doc__ string and reformats it as help.
func
absl.flags._helpers.flag_dict_to_args(flag_map:dict[str, Any], multi_flags:set[str] | None=None) -> Iterable[str]Convert a dict of values into process call parameters.
func
absl.flags._helpers.get_flag_suggestions(attempt:str, longopt_list:Sequence[str]) -> list[str]Returns helpful similar matches for an invalid flag.
func
absl.flags._helpers.trim_docstring(docstring:str) -> strRemoves indentation from triple-quoted strings.
class
absl.flags._validators_classes.MultiFlagsValidatorValidator behind register_multi_flags_validator method.
class
absl.flags._validators_classes.SingleFlagValidatorValidator behind register_validator() method.
class
absl.flags._validators_classes.ValidatorBase class for flags validators.
class
absl.flags.argparse_flags.ArgumentParserCustom ArgumentParser class to support special absl flags.
class
absl.logging.ABSLHandlerAbseil Python logging module's log handler.
class
absl.logging.PythonFormatterFormatter class used by :class:`~absl.logging.PythonHandler`.
class
absl.logging.PythonHandlerThe handler class used by Abseil Python logging implementation.
method
absl.logging.PythonHandler.close()Closes the stream to which we are writing.
method
absl.logging.PythonHandler.emit(record)Prints a record out to some streams.
method
absl.logging.PythonHandler.flush()Flushes all log files.
func
absl.logging.debug(msg, *args, **kwargs)Logs a debug message.
func
absl.logging.error(msg, *args, **kwargs)Logs an error message.
func
absl.logging.fatal(msg, *args, **kwargs)Logs a fatal message.
func
absl.logging.flush()Flushes all log files.
func
absl.logging.get_absl_handler()Returns the absl handler instance.
func
absl.logging.get_absl_logger()Returns the absl logger instance.
func
absl.logging.get_log_file_name(level=INFO)Returns the name of the log file.
func
absl.logging.get_verbosity()Returns the logging verbosity.
func
absl.logging.info(msg, *args, **kwargs)Logs an info message.
func
absl.logging.level_debug()Returns True if debug logging is turned on.
func
absl.logging.level_error()Returns True if error logging is turned on.
func
absl.logging.level_info()Returns True if info logging is turned on.
func
absl.logging.log(level, msg, *args, **kwargs)Logs ``msg % args`` at absl logging level ``level``.
func
absl.logging.set_verbosity(v)Sets the logging verbosity.
func
absl.logging.use_absl_handler()Uses the ABSL logging handler for logging.
func
absl.logging.warn(msg, *args, **kwargs)Deprecated, use 'warning' instead.
func
absl.logging.warning(msg, *args, **kwargs)Logs a warning message.
About this data
These signatures were extracted from the public source of abseil/abseil-py
using Python's ast module. Argument names, default values,
type annotations and return types are taken verbatim from the code.
Implementation bodies are never stored. See
how it works for details.