agent0.chainsync
Loads config
Submodules
Classes
The configuration dataclass for postgres connections. |
Functions
|
Build a PostgresConfig that looks for environmental variables. |
Package Contents
- class agent0.chainsync.PostgresConfig
The configuration dataclass for postgres connections.
Replace the user, password, and db_name with the credentials of your setup.
- POSTGRES_USER: str = 'admin'
The username to authenticate with.
- POSTGRES_PASSWORD: str = 'password'
The password to authenticate with.
- POSTGRES_DB: str = 'agent0_db'
The name of the database.
- POSTGRES_HOST: str = 'localhost'
The hostname to connect to.
- POSTGRES_PORT: int = 5432
The port to connect to.
- POSTGRES_VERSION: str | None = None
The postgres version.
- create_url_obj() sqlalchemy.URL
Creates an SQLAlchemy URL object from the config.
- Returns:
An SQLAlchemy URL object.
- Return type:
URL
- agent0.chainsync.build_postgres_config_from_env() PostgresConfig
Build a PostgresConfig that looks for environmental variables. If env var exists, use that, otherwise, use default.
- Returns:
Config settings required to connect to and use the database.
- Return type: