cvfe.api package

Subpackages

Submodules

cvfe.api.apps module

class cvfe.api.apps.StandaloneApplication(app, options=None)[source]

Bases: BaseApplication

A runner to help us parse argparse next to gunicorn args

For options, you can visit https://docs.gunicorn.org/en/latest/settings.html

__init__(app, options=None)[source]

Initialize runner

Parameters:
  • app (Callable) – A callable as the ASGI/WSGI application

  • options (dict, optional) – A dictionary were keys are command line args and values are their corresponding values. Defaults to None.

load_config()[source]

Loads only those options that are valid

load()[source]
cvfe.api.apps.init_webhooks(base_url)[source]
class cvfe.api.apps.Settings(_case_sensitive=None, _env_prefix=None, _env_file=PosixPath('.'), _env_file_encoding=None, _env_nested_delimiter=None, _secrets_dir=None, **values)[source]

Bases: BaseSettings

BASE_URL: ClassVar[str] = ''
USE_NGROK: ClassVar[bool] = False
_abc_impl = <_abc._abc_data object>
model_config: ClassVar[SettingsConfigDict] = {'arbitrary_types_allowed': True, 'case_sensitive': False, 'env_file': None, 'env_file_encoding': None, 'env_nested_delimiter': None, 'env_prefix': '', 'extra': 'forbid', 'protected_namespaces': ('model_', 'settings_'), 'secrets_dir': None, 'validate_default': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[dict[str, FieldInfo]] = {}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

cvfe.api.apps.init_ngrok(host, port)[source]

cvfe.api.models module

Module contents