Exemple #1
0
            class P8Cert:
                file_name: str
                key_id: str
                team_id: str
                topic: str  # Bundle id

            pem_cert: PEMCert
            p8_cert: P8Cert
            cert_type: str

        @deserialize.default('port', 3306)
        @deserialize.parser('port', int)
        class MySQL:
            host: str
            port: int
            user: str
            password: str
            database: str

        apns: APNs
        pool_size: int
        task_queue: MySQL

    push_worker: MessagingWorker


config_path = f'{Path(__file__).resolve().parent}/config'

config: Config = deserialize.deserialize(Config, get_config(config_path))
Exemple #2
0
            v1: V1
            legacy: Legacy
            client: str

        @deserialize.default('port', 6379)
        @deserialize.parser('port', int)
        class Redis:

            @deserialize.parser('database', int)
            class Database:
                database: int

            host: str
            port: int
            password: str

            notification_queue: Database

        fcm: FCM
        pool_size: int
        redis: Redis

    push_worker: FCMPushWorker


config_path = f'{Path(__file__).resolve().parent}/config'

config: Config = deserialize.deserialize(
    Config, get_config(config_path)
)