oqtant.settings
1# Copyright 2023 Infleqtion 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# https://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14 15from pydantic import BaseSettings 16 17 18class Settings(BaseSettings): 19 auth0_base_url: str = "https://coldquanta-dev.us.auth0.com" 20 auth0_client_id: str = "ZzQdn5ZZq1dmpP5N55KINr33u47RBRiu" 21 auth0_scope: str = "offline_access bec_dev_service:client" 22 auth0_audience: str = "https://oraqle-dev.infleqtion.com/oqtant" 23 signin_local_callback_url: str = "http://localhost:8080" 24 base_url: str = "https://oraqle-dev.infleqtion.com/api/jobs" 25 max_ind_var: int = 2 26 max_job_batch_size: int = 30
class
Settings(pydantic.env_settings.BaseSettings):
19class Settings(BaseSettings): 20 auth0_base_url: str = "https://coldquanta-dev.us.auth0.com" 21 auth0_client_id: str = "ZzQdn5ZZq1dmpP5N55KINr33u47RBRiu" 22 auth0_scope: str = "offline_access bec_dev_service:client" 23 auth0_audience: str = "https://oraqle-dev.infleqtion.com/oqtant" 24 signin_local_callback_url: str = "http://localhost:8080" 25 base_url: str = "https://oraqle-dev.infleqtion.com/api/jobs" 26 max_ind_var: int = 2 27 max_job_batch_size: int = 30
Base class for settings, allowing values to be overridden by environment variables.
This is useful in production for secrets you do not wish to save in code, it plays nicely with docker(-compose), Heroku and any 12 factor app design.
Inherited Members
- pydantic.env_settings.BaseSettings
- BaseSettings
- Config
- pydantic.main.BaseModel
- dict
- json
- parse_obj
- parse_raw
- parse_file
- from_orm
- construct
- copy
- schema
- schema_json
- validate
- update_forward_refs