Skip to content

shipany.bot.providers

shipany.bot.providers package

Submodules

shipany.bot.providers.bindings module

shipany.bot.providers.bindings.default_bindings(binder)

Bind the default dependencies.

  • Parameters: binder (Binder) — The dependency injector binder.
  • Return type: None

shipany.bot.providers.captures module

class shipany.bot.providers.captures.CapturesProvider

Bases: object

The captures provider to provide the captures.

It is a subject of dependency injection.

snapshot(handle_generator)

Provide the snapshot of the captures.

class shipany.bot.providers.captures.CapturesModifier

Bases: object

The captures modifier to modify the captures.

  • Parameters:
    • captures (MutableMapping[str, str]) — The captures to modify.
    • locals — The local variables to modify.
    • handle_generator (HandleGenerator) — The handle generator.

__init__(captures, locals_, handle_generator)

  • Parameters:
    • self (Self)
    • captures (MutableMapping *[*str , str ])
    • locals_ (MutableMapping *[*str , str ])
    • handle_generator (HandleGenerator)
  • Return type: None

set(key, value, *, scope)

Set the value to the key.

  • Parameters:
    • key (str) — The key to set the value.
    • value (str) — The value to set.
    • scope (list[Scope]) — The scope to set the value.
  • Return type: None

get(key, *, scope)

Get the value by the key.

  • Parameters:
    • key (str) — The key to get the value.
    • scope (list[Scope]) — The scope to get the value.
  • Return type: str

remove(key, *, scope)

Remove the value by the key.

  • Parameters:
    • key (str) — The key to remove the value.
    • scope (list[Scope]) — The scope to remove the value.
  • Return type: None

class shipany.bot.providers.captures.InMemoryCapturesProvider

Bases: object

The in-memory captures provider to provide the captures.

  • Parameters:
    • setup_captures (Mapping[str, str] | None, default: None) — The initial value of the captures.
    • setup_locals (Mapping[str, str] | None, default: None) — The initial value of the local variables.

__init__(*, setup_captures=None, setup_locals=None)

  • Parameters:
    • self (Self)
    • setup_captures (Mapping *[*str , str ] | None)
    • setup_locals (Mapping *[*str , str ] | None)
  • Return type: None

snapshot(handle_generator)

Provide the snapshot of the captures.

shipany.bot.providers.secrets module

class shipany.bot.providers.secrets.SecretsProvider

Bases: object

The secrets provider to provide the secrets to the runtime context.

It is a subject of the dependency injection.

snapshot()

Provide the snapshot of the secrets.

  • Parameters: self (Self)
  • Return type: AsyncIterator[Mapping[str, str]]

class shipany.bot.providers.secrets.StubSecretsProvider

Bases: object

The stub secrets provider to provide the secrets to the runtime context.

  • Parameters: initial_value (Mapping[str, str] | None, default: None) — The initial value of the secrets.

__init__(initial_value=None)

  • Parameters:
    • self (Self)
    • initial_value (Mapping *[*str , str ] | None)
  • Return type: None

snapshot()

Provide the snapshot of the secrets.

  • Parameters: self (Self)
  • Return type: AsyncIterator[Mapping[str, str]]

Module contents