API Documentation

Subpackages

Submodules

filip.config module

Settings module to set url from .env.filip file. This can also seen as an example for other applications such as webapp that use the library. Using *.env belongs to best practices in containerized applications. Pydantic provides a convenient and clean way to manage environments.

pydantic settings filip.config.Settings[source]

Bases: BaseSettings

Settings class that reads environment variables from a local .env.filip file or environment variables. The .env.filip must be located in the current working directory.

Show JSON schema
{
   "title": "Settings",
   "description": "Settings class that reads environment variables from a local `.env.filip`\nfile or environment variables. The `.env.filip` must be located in the\ncurrent working directory.",
   "type": "object",
   "properties": {
      "CB_URL": {
         "title": "Cb Url",
         "default": "http://127.0.0.1:1026",
         "env": [
            "ORION_URL",
            "CB_URL",
            "CB_HOST",
            "CONTEXTBROKER_URL",
            "OCB_URL"
         ],
         "env_names": [
            "orion_url",
            "cb_url",
            "cb_host",
            "contextbroker_url",
            "ocb_url"
         ],
         "minLength": 1,
         "maxLength": 65536,
         "format": "uri",
         "type": "string"
      },
      "IOTA_URL": {
         "title": "Iota Url",
         "default": "http://127.0.0.1:4041",
         "env": "IOTA_URL",
         "env_names": "{'iota_url'}",
         "minLength": 1,
         "maxLength": 65536,
         "format": "uri",
         "type": "string"
      },
      "QL_URL": {
         "title": "Ql Url",
         "default": "http://127.0.0.1:8668",
         "env": [
            "QUANTUMLEAP_URL",
            "QL_URL"
         ],
         "env_names": [
            "quantumleap_url",
            "ql_url"
         ],
         "minLength": 1,
         "maxLength": 65536,
         "format": "uri",
         "type": "string"
      }
   },
   "additionalProperties": false
}

Config:
  • case_sensitive: bool = False

  • env_file: str = .env.filip

  • env_file_encoding: str = utf-8

Fields:
field CB_URL: AnyHttpUrl = 'http://127.0.0.1:1026'
Constraints:
  • minLength = 1

  • maxLength = 65536

  • format = uri

field IOTA_URL: AnyHttpUrl = 'http://127.0.0.1:4041'
Constraints:
  • minLength = 1

  • maxLength = 65536

  • format = uri

field QL_URL: AnyHttpUrl = 'http://127.0.0.1:8668'
Constraints:
  • minLength = 1

  • maxLength = 65536

  • format = uri

filip.types module

Variable types and classes used for better validation

class filip.types.AnyMqttUrl(url: str | None, **kwargs)[source]

Bases: AnyUrl

Url used for MQTT communication

allowed_schemes = {'mqtt'}
fragment
host
host_type
password
path
port
query
scheme
tld
user

Module contents

filip-Module. See readme or documentation for more information.