launchflow.aws.rds

RDSPostgres

1
class RDSPostgres(Resource[RDSPostgresConnectionInfo])

A RDS SQL Postgres resource.

Args:

  • name: The name of the Cloud SQL Postgres instance.

Example usage:

1
import launchflow as lf
2
db = lf.aws.RDSPostgres("my-pg-db")

sqlalchemy_engine

1
def sqlalchemy_engine(**engine_kwargs)

Returns a SQLAlchemy engine for connecting to the RDS SQL Postgres instance.

Args:

  • **engine_kwargs: Additional keyword arguments to pass to sqlalchemy.create_engine.

Example usage:

1
import launchflow as lf
2
db = lf.aws.RDSPostgres("my-pg-db")
3
engine = db.sqlalchemy_engine()

sqlalchemy_async_engine

1
async def sqlalchemy_async_engine(**engine_kwargs)

Returns an async SQLAlchemy engine for connecting to the RDS SQL Postgres instance.

Args:

  • **engine_kwargs: Additional keyword arguments to pass to create_async_engine.

Example usage:

1
import launchflow as lf
2
db = lf.aws.RDSPostgres("my-pg-db")
3
engine = await db.sqlalchemy_async_engine()