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

Create classes for things #11

Open
gabrc52 opened this issue Jul 27, 2023 · 1 comment
Open

Create classes for things #11

gabrc52 opened this issue Jul 27, 2023 · 1 comment

Comments

@gabrc52
Copy link
Owner

gabrc52 commented Jul 27, 2023

It's annoying to read JSON properties using dictionary indexing every time. Make classes for messages, events, etc. if this is to scale to a maintanable project. Although this sounds like it should be done in the Python mattermost library itself, which is pretty bare-bones for now.

@gabrc52
Copy link
Owner Author

gabrc52 commented Aug 16, 2023

Alternative: TypedDict

from typing_extensions import TypedDict

TIL! Used in Synapes

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

No branches or pull requests

1 participant