Public API

Section Description

This section describes the library’s public API. It includes:

  • Classes and functions for integration into your applications.

  • Usage recommendations and supported scenarios.

  • Code examples, detailed signatures, and descriptions of return values.

  • Stability and backward compatibility guarantees.

Interfaces not described in this section are considered internal. Using them may lead to errors when updating the library. When developing your own solutions, use only the components described here. This will ensure the stability and compatibility of your products with future versions of Argenta.


Public Imports

All main library components are available for direct import from the root package argenta or its submodules.

Main Components

from argenta import App, Orchestrator, Router, Command, Response
  • App — Application object responsible for routing logic, settings, validation, etc.

  • Orchestrator — Class for configuring and launching the entire application.

  • Router — Class for grouping and registering commands.

  • Command — Class for creating commands when initializing handlers.

  • Response — Response object passed to handlers.

Commands and Flags

from argenta.command import (
    Flag,
    Flags,
    InputFlag,
    InputFlags,
    PossibleValues,
    ValidationStatus,
    PredefinedFlags
)

Application Configuration

from argenta.app import (
    AutoCompleter,
    StaticDividingLine,
    DynamicDividingLine,
    PredefinedMessages
)

Dependency Injection

from argenta.di import (
    FromDishka,
    inject
)
  • FromDishka — Marker for a function argument as a dependency that should be injected.

  • inject — Decorator for injecting dependencies specified in the signature.