Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Idea: Be able to replace TableConnection for ResultIterator #1231

Open
fernandoflorez opened this issue Mar 7, 2024 · 0 comments
Open

Idea: Be able to replace TableConnection for ResultIterator #1231

fernandoflorez opened this issue Mar 7, 2024 · 0 comments

Comments

@fernandoflorez
Copy link

fernandoflorez commented Mar 7, 2024

Hello,

Not an issue but a discussion to see what you guys feel about this idea.

Since there is no DAX support on pynamodb we are using extra logic to cache results on redis. I'd like to have something built in to transparently integrate a connection chain, ex: redis -> dynamodb.

The goal would be to provide an alternative class (TableConnection like) to query for objects.

Maybe it could be implemented on meta?

class UserModel(Model):
    class Meta:
        connection_class = CustomConnection

    email = UnicodeAttribute(hash_key=True)
    ... 

This way on this custom class we could query external sources (like redis) and fallback to TableConnection if required.

What do you think of the idea?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant