sdkagent

tox API reference

121 public APIs from tox (tox-dev/tox) — 50 classes, 23 functions, 48 methods. Signatures extracted by static analysis of the actual source.

Repository: tox-dev/tox

KindCount
Classes50
Functions23
Methods48

API list

funcsrc.tox.config.cli.env_var.get_env_var(key:str, of_type:type[Any]) -> tuple[Any, str] | None
Get the environment variable option.
classsrc.tox.config.cli.parser.Parsed
CLI options.
methodsrc.tox.config.cli.parser.Parsed.is_colored() -> bool
:returns: flag indicating if the output is colored or not
methodsrc.tox.config.cli.parser.Parsed.verbosity() -> int
:returns: reporting verbosity
classsrc.tox.config.cli.parser.ToxParser
Argument parser for tox.
classsrc.tox.config.loader.api.ConfigLoadArgs
Arguments that help loading a configuration value.
methodsrc.tox.config.loader.api.ConfigLoadArgs.copy() -> ConfigLoadArgs
:returns: create a copy of the object
classsrc.tox.config.loader.api.Loader
Loader loads configuration values and converts it.
methodsrc.tox.config.loader.api.Loader.load(key:str, of_type:type[V] | UnionType, factory:Factory[V], conf:Config | None, args:ConfigLoadArgs, all_keys:Iterable[str]=()) -> V
Load a value (raw and then convert).
methodsrc.tox.config.loader.api.Loader.load_raw(key:str, conf:Config | None, env_name:str | None) -> T
Load the raw object from the config store.
classsrc.tox.config.loader.api.Override
An override for config definitions.
methodsrc.tox.config.loader.convert.Convert.to(raw:T, of_type:type[V] | UnionType, factory:Factory[V]) -> V
Convert given raw type to python type.
methodsrc.tox.config.loader.convert.Convert.to_bool(value:T) -> bool
Convert to boolean.
methodsrc.tox.config.loader.convert.Convert.to_command(value:T) -> Command | None
Convert to a command to execute.
methodsrc.tox.config.loader.convert.Convert.to_dict(value:T, of_type:tuple[type[Any], type[Any]]) -> Iterator[tuple[T, T]]
Convert to dictionary.
methodsrc.tox.config.loader.convert.Convert.to_env_list(value:T) -> EnvList
Convert to a tox EnvList.
methodsrc.tox.config.loader.convert.Convert.to_list(value:T, of_type:type[Any]) -> Iterator[T]
Convert to list.
methodsrc.tox.config.loader.convert.Convert.to_path(value:T) -> Path
Convert to path.
methodsrc.tox.config.loader.convert.Convert.to_set(value:T, of_type:type[Any]) -> Iterator[T]
Convert to set.
methodsrc.tox.config.loader.convert.Convert.to_str(value:T) -> str
Convert to string.
funcsrc.tox.config.loader.ini.factor.expand_ranges(value:str) -> str
Expand ranges in env expressions.
classsrc.tox.config.loader.memory.MemoryLoader
Loads configuration directly from data in memory.
classsrc.tox.config.loader.replacer.MatchError
Couldn't find end terminator in MatchExpression.
classsrc.tox.config.loader.replacer.MatchExpression
An expression that is handled specially by the Replacer.
methodsrc.tox.config.loader.replacer.MatchExpression.parse_and_split_to_terminator(value:str, terminator:str='', split:str | None=None) -> tuple[Sequence[MatchArg], int]
Tokenize `value` to up `terminator` character.
classsrc.tox.config.loader.replacer.MatchRecursionError
Could not stabilize on replacement value.
funcsrc.tox.config.loader.replacer.find_replace_expr(value:str) -> MatchArg
Find all replaceable tokens within value.
classsrc.tox.config.loader.section.Section
tox configuration section.
methodsrc.tox.config.loader.section.Section.from_key(key:str) -> Self
Create a section from a section key.
methodsrc.tox.config.loader.section.Section.key() -> str
:returns: the section key
methodsrc.tox.config.loader.section.Section.name() -> str
:returns: the name of the section
methodsrc.tox.config.loader.section.Section.prefix() -> str | None
:returns: the prefix of the section
classsrc.tox.config.loader.str_convert.StrConvert
A class converting string values to tox types.
funcsrc.tox.config.loader.stringify.stringify(value:Any) -> tuple[str, bool]
Transform a value into a string representation.
classsrc.tox.config.loader.toml.TomlLoader
Load configuration from a pyproject.toml file.
funcsrc.tox.config.loader.toml._product.expand_product(value:dict[str, Any]) -> list[str]
Expand a product dict into a flat list of environment names.
classsrc.tox.config.main.Config
Main configuration object for tox.
methodsrc.tox.config.main.Config.core() -> CoreConfigSet
:returns: the core configuration
methodsrc.tox.config.main.Config.make(parsed:Parsed, pos_args:Sequence[str] | None, source:Source, extra_envs:Iterable[str]) -> Config
Make a tox configuration object.
methodsrc.tox.config.main.Config.src_path() -> Path
:returns: the location of the tox configuration source
methodsrc.tox.config.main.Config.work_dir() -> Path
:returns: working directory for this project
classsrc.tox.config.of_type.ConfigDefinition
Abstract base class for configuration definitions.
classsrc.tox.config.sets.CoreConfigSet
Configuration set for the core tox config.
classsrc.tox.config.sets.EnvConfigSet
Configuration set for a tox environment.
methodsrc.tox.config.source.api.Source.get_core_section() -> Section
:returns: the core section
methodsrc.tox.config.source.api.Source.get_tox_env_section(item:str) -> tuple[Section, list[str], list[str]]
:returns: the section for a tox environment
methodsrc.tox.config.source.api.Source.sections() -> Iterator[Section]
Return a loader that loads the core configuration values.
funcsrc.tox.config.source.discover.discover_source(config_file:Path | None, root_dir:Path | None) -> Source
Discover a source for configuration.
classsrc.tox.config.source.ini.IniSource
Configuration sourced from a ini file (such as tox.ini).
classsrc.tox.config.source.setup_cfg.SetupCfg
Configuration sourced from a setup.cfg file.
classsrc.tox.config.source.toml_pyproject.TomlPyProject
Configuration sourced from a pyproject.toml files.
classsrc.tox.config.source.toml_tox.TomlTox
Configuration sourced from a pyproject.toml files.
classsrc.tox.config.source.tox_ini.ToxIni
Configuration sourced from a tox.ini file.
classsrc.tox.config.types.CircularChainError
circular chain in config
classsrc.tox.config.types.Command
A command to execute.
classsrc.tox.config.types.EnvList
A tox environment list.
classsrc.tox.execute.api.Execute
Abstract API for execution of a tox environment.
classsrc.tox.execute.api.ExecuteInstance
An instance of a command execution.
classsrc.tox.execute.api.Outcome
Result of a command execution.
methodsrc.tox.execute.api.Outcome.assert_failure() -> None
Assert that the execution failed.
methodsrc.tox.execute.api.Outcome.assert_success() -> None
Assert that the execution succeeded.
methodsrc.tox.execute.api.Outcome.elapsed() -> float
:returns: time the execution took in seconds
methodsrc.tox.execute.api.Outcome.log_run_done(lvl:int) -> None
Log that the run was done.
classsrc.tox.execute.pep517_backend.LocalSubProcessPep517ExecuteInstance
A backend invocation.
classsrc.tox.execute.pep517_backend.LocalSubProcessPep517Executor
Executor holding the backend process.
classsrc.tox.execute.request.ExecuteRequest
Defines a commands execution request.
methodsrc.tox.execute.request.ExecuteRequest.shell_cmd() -> str
:returns: the command to run as a shell command
funcsrc.tox.execute.util.shebang(exe:str) -> list[str] | None
:param exe: the executable :returns: the shebang interpreter arguments
classsrc.tox.journal.env.EnvJournal
Report the status of a tox environment.
methodsrc.tox.journal.env.EnvJournal.add_execute(outcome:Outcome, run_id:str) -> None
Add a command execution to the journal.
classsrc.tox.journal.main.Journal
The result of a tox session.
methodsrc.tox.journal.main.Journal.get_env_journal(name:str) -> EnvJournal
Return the env log of an environment (create on first call).
funcsrc.tox.plugin.spec.tox_add_core_config(core_conf:ConfigSet, state:State) -> None
Called when the core configuration is built for a tox environment.
funcsrc.tox.plugin.spec.tox_add_env_config(env_conf:EnvConfigSet, state:State) -> None
Called when configuration is built for a tox environment.
funcsrc.tox.plugin.spec.tox_add_option(parser:ToxParser) -> None
Add a command line argument.
funcsrc.tox.plugin.spec.tox_after_run_commands(tox_env:ToxEnv, exit_code:int, outcomes:list[Outcome]) -> None
Called after the commands set is executed.
funcsrc.tox.plugin.spec.tox_before_run_commands(tox_env:ToxEnv) -> None
Called before the commands set is executed.
funcsrc.tox.plugin.spec.tox_env_teardown(tox_env:ToxEnv) -> None
Called after a tox environment has been teared down.
funcsrc.tox.plugin.spec.tox_extend_envs() -> Iterable[str]
Declare additional environment names.
funcsrc.tox.plugin.spec.tox_on_install(tox_env:ToxEnv, arguments:Any, section:str, of_type:str) -> None
Called before executing an installation command.
funcsrc.tox.plugin.spec.tox_register_tox_env(register:ToxEnvRegister) -> None
Register new tox environment type.
classsrc.tox.report.HandledError
Error that has been handled so no need for stack trace.
funcsrc.tox.run.setup_state(args:Sequence[str]) -> State
Setup the state object of this run.
funcsrc.tox.session.cmd.run.common.ready_to_run_envs(state:State, to_run:list[str], completed:set[str]) -> Iterator[list[str]]
Generate tox environments ready to run.
funcsrc.tox.session.cmd.run.parallel.run_parallel(state:State) -> int
Here we'll just start parallel sub-processes.
funcsrc.tox.session.env_select.register_env_select_flags(parser:ArgumentParser, default:CliEnv | None, multiple:bool=True, group_only:bool=False) -> argparse._ActionsContainer
Register environment selection flags.
classsrc.tox.session.state.State
Runtime state holder.
methodsrc.tox.session.state.State.envs() -> EnvSelector
:returns: provides access to the tox environments
classsrc.tox.tox_env.api.ToxEnv
A tox environment.
methodsrc.tox.tox_env.api.ToxEnv.env_dir() -> Path
:returns: the tox environments environment folder
methodsrc.tox.tox_env.api.ToxEnv.env_log_dir() -> Path
:returns: the tox environments log folder
methodsrc.tox.tox_env.api.ToxEnv.env_tmp_dir() -> Path
:returns: the tox environments temp folder
methodsrc.tox.tox_env.api.ToxEnv.interrupt() -> None
Interrupt the execution of a tox environment.
classsrc.tox.tox_env.api.ToxEnvCreateArgs
Arguments to pass on when creating a tox environment.
classsrc.tox.tox_env.errors.Fail
Failed creating env.
classsrc.tox.tox_env.errors.Recreate
Recreate the tox environment.
classsrc.tox.tox_env.errors.RunnerUnavailable
Runner for this environment is not available.
classsrc.tox.tox_env.errors.Skip
Skip this tox environment.
classsrc.tox.tox_env.info.Info
Stores metadata about the tox environment.
classsrc.tox.tox_env.package.Package
package.
classsrc.tox.tox_env.python.api.NoInterpreter
could not find interpreter.
methodsrc.tox.tox_env.python.api.Python.base_python() -> PythonInfo
Resolve base python.
methodsrc.tox.tox_env.python.api.Python.env_bin_dir() -> Path
The binary folder within the tox environment.
methodsrc.tox.tox_env.python.api.Python.env_python() -> Path
The python executable within the tox environment.
methodsrc.tox.tox_env.python.api.Python.python_spec_for_path(path:Path) -> PythonSpec
Get the spec for an absolute path to a Python executable.
classsrc.tox.tox_env.python.package.EditableLegacyPackage
legacy editable package.
classsrc.tox.tox_env.python.package.EditablePackage
PEP-660 editable package.
classsrc.tox.tox_env.python.package.PythonPackage
python package.
classsrc.tox.tox_env.python.package.SdistPackage
sdist package.
classsrc.tox.tox_env.python.package.WheelPackage
wheel package.
classsrc.tox.tox_env.python.virtual_env.package.pyproject.BuildEditableNotSupportedError
raised when build editable is not supported.
funcsrc.tox.tox_env.python.virtual_env.package.util.extract_extra_markers(deps:list[Requirement]) -> list[tuple[Requirement, set[str | None]]]
Extract extra markers from dependencies.
classsrc.tox.tox_env.register.ToxEnvRegister
tox environment registry.
methodsrc.tox.tox_env.register.ToxEnvRegister.add_package_env(of_type:type[PackageToxEnv]) -> None
Define a new packaging tox environment type.
methodsrc.tox.tox_env.register.ToxEnvRegister.add_run_env(of_type:type[RunToxEnv]) -> None
Define a new run tox environment type.
methodsrc.tox.tox_env.register.ToxEnvRegister.default_env_runner() -> str
:returns: the default run environment type
methodsrc.tox.tox_env.register.ToxEnvRegister.env_runners() -> Iterable[str]
:returns: run environment types currently defined
methodsrc.tox.tox_env.register.ToxEnvRegister.package(name:str) -> type[PackageToxEnv]
Lookup a packaging tox environment type by name.
methodsrc.tox.tox_env.register.ToxEnvRegister.runner(name:str) -> type[RunToxEnv]
Lookup a run tox environment type by name.
funcsrc.tox.util.ci.is_ci() -> bool
:returns: a flag indicating if running inside a CI env or not
funcsrc.tox.util.redact.redact_value(name:str, value:str) -> str
Mask ``value`` if ``name`` looks like it identifies a secret.

About this data

These signatures were extracted from the public source of tox-dev/tox 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.

Back to all 805 libraries