agent0.chainsync ================ .. py:module:: agent0.chainsync .. autoapi-nested-parse:: Loads config .. !! processed by numpydoc !! Submodules ---------- .. toctree:: :maxdepth: 1 /autoapi/agent0/chainsync/analysis/index /autoapi/agent0/chainsync/dashboard/index /autoapi/agent0/chainsync/db/index /autoapi/agent0/chainsync/df_to_db/index /autoapi/agent0/chainsync/exec/index /autoapi/agent0/chainsync/postgres_config/index /autoapi/agent0/chainsync/test_fixtures/index Classes ------- .. autoapisummary:: agent0.chainsync.PostgresConfig Functions --------- .. autoapisummary:: agent0.chainsync.build_postgres_config_from_env Package 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 !!