agent0.chainsync.postgres_config ================================ .. py:module:: agent0.chainsync.postgres_config .. autoapi-nested-parse:: Defines the postgres configuration from env vars. .. !! processed by numpydoc !! Classes ------- .. autoapisummary:: agent0.chainsync.postgres_config.PostgresConfig Functions --------- .. autoapisummary:: agent0.chainsync.postgres_config.build_postgres_config_from_env Module Contents --------------- .. py:class:: PostgresConfig The configuration dataclass for postgres connections. Replace the user, password, and db_name with the credentials of your setup. .. !! processed by numpydoc !! .. py:attribute:: POSTGRES_USER :type: str :value: 'admin' The username to authenticate with. .. !! processed by numpydoc !! .. py:attribute:: POSTGRES_PASSWORD :type: str :value: 'password' The password to authenticate with. .. !! processed by numpydoc !! .. py:attribute:: POSTGRES_DB :type: str :value: 'agent0_db' The name of the database. .. !! processed by numpydoc !! .. py:attribute:: POSTGRES_HOST :type: str :value: 'localhost' The hostname to connect to. .. !! processed by numpydoc !! .. py:attribute:: POSTGRES_PORT :type: int :value: 5432 The port to connect to. .. !! processed by numpydoc !! .. py:attribute:: POSTGRES_VERSION :type: str | None :value: None The postgres version. .. !! processed by numpydoc !! .. py:method:: create_url_obj() -> sqlalchemy.URL Creates an SQLAlchemy URL object from the config. :returns: An SQLAlchemy URL object. :rtype: URL .. !! processed by numpydoc !! .. py:function:: 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. :rtype: PostgresConfig .. !! processed by numpydoc !!