nayaverdier / dyntastic

A DynamoDB library on top of Pydantic and boto3.
MIT License
57 stars 14 forks source link

Localstack support #18

Closed wesleyearlstander closed 8 months ago

wesleyearlstander commented 8 months ago

Hi team,

I'm currently very interested in using this for my projects.

One thing that I'd like to get out of the box is Localstack support for the models so that the host automatically gets rewritten to the Localstack when Localstack is configured.

I'm adding this issue here as I think it would be a nice QOL upgrade, and perhaps I will get to it if I find time.

nayaverdier commented 8 months ago

What mechanism would you propose to detect whether localstack is configured? Currently if the DYNTASTIC_HOST environment variable is defined, it will pull the host value from that by default.

wesleyearlstander commented 8 months ago

Okay that works for me.

From the examples I thought I needed to set it on each model.

On Thu, 15 Feb 2024, 17:17 nayaverdier, @.***> wrote:

What mechanism would you propose to detect whether localstack is configured? Currently if the DYNTASTIC_HOST environment variable is defined, it will pull the host value from that by default.

— Reply to this email directly, view it on GitHub https://github.com/nayaverdier/dyntastic/issues/18#issuecomment-1946646238, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALXLBYA75FB5SQVKWO7MGX3YTY7JFAVCNFSM6AAAAABDIJV2P2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNBWGY2DMMRTHA . You are receiving this because you authored the thread.Message ID: @.***>

AidanStrong commented 4 months ago

Reopening this issue as I have a related problem.

I am using localstack for dynamodb but my python ode is running in a seprate docker container, so I need to use AWS ACCESS_ID and ACCESS_KEY to authenticate to my local dynamodb - I see no option to do this with dyntastic. Am I mistaken or is this feature yet to be added?

edit: Nevermind, I was able to get this working with environment variables.