cunybpl / aiodal

async data access layer and related tools for sqlalchemy core
0 stars 0 forks source link

Add the `connect` module #4

Closed bsnacks000 closed 11 months ago

bsnacks000 commented 11 months ago

We have a useful module that we reuse often called connect that is in bemadb and currently being ported into beist. I've used similar idiom in other sqlalchemy client projects as well and it would be useful to have this functionality just be importable...

Example implementation ... https://github.com/cunybpl/bemadb/blob/development/bemadb/cli/connect.py

We would probably want to generalize this somewhat and maybe pass in **kwargs to configure the engine and allow to pass in sa.MetaData if needed. Also remove if not uri: uri = config.POSTGRES_URI since that is part of the fastapi application config and should not be relied on.

kgasiorowski commented 11 months ago

@bsnacks000 Could you assign this to me? I spent some time working on it on Friday and I'd like to finish it out on Monday.