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

AlephClientBase and AuthenticatedAlephClientBase #54

Merged
merged 7 commits into from
Sep 27, 2023
Merged

Conversation

MHHukiewitz
Copy link
Member

Adding abstract base classes for the client classes and add several improvements:

  • Many pages of messages can now be iterated over with get_messages_iterator or get_posts_iterator.
  • get_posts now returns a PostsResponse type instead of untyped dictionary
  • Harmonize get_messages and watch_messages as both should have the same query parameters
  • Moved all docstrings from the client classes to their ABCs

@hoh
Copy link
Member

hoh commented Aug 28, 2023

Thanks for this proposal for improving the SDK.

The capability of using generators such as your suggestion for get_messages_iterator seems very relevant.

I believe that there is a better way of doing this than adding such method, and I experimented a bit with a new Pull Request here: #58

@MHHukiewitz MHHukiewitz force-pushed the mhh-base-client branch 2 times, most recently from 66f456f to ec518b5 Compare August 30, 2023 07:07
src/aleph/sdk/base.py Outdated Show resolved Hide resolved
src/aleph/sdk/base.py Outdated Show resolved Hide resolved
src/aleph/sdk/client.py Show resolved Hide resolved
src/aleph/sdk/client.py Outdated Show resolved Hide resolved
src/aleph/sdk/client.py Outdated Show resolved Hide resolved
src/aleph/sdk/client.py Outdated Show resolved Hide resolved
src/aleph/sdk/client.py Show resolved Hide resolved
@MHHukiewitz
Copy link
Member Author

Thanks for this proposal for improving the SDK.

The capability of using generators such as your suggestion for get_messages_iterator seems very relevant.

I believe that there is a better way of doing this than adding such method, and I experimented a bit with a new Pull Request here: #58

Merging the PRs that are lined up would conflict with the proposed changes in #58. I would offer to take these suggested changes and make another PR that integrates better with the new ABCs and MessageCache/DomainNode classes.

.coveragerc Show resolved Hide resolved
cache/files/QmAndSoOn Outdated Show resolved Hide resolved
src/aleph/sdk/base.py Show resolved Hide resolved
src/aleph/sdk/base.py Show resolved Hide resolved
@MHHukiewitz
Copy link
Member Author

@hoh and me agreed to continue with merging the branch after another review. I will take care of implementing certain features of #58 in future PRs on the basis of this PR and #59, but will now prioritize UX, especially around deployment and managing of VMs, as new features will hit https://github.com/aleph-im/aleph-vm soon.

@odesenfans please review the requested changes and approve, if no further required.

@MHHukiewitz MHHukiewitz merged commit d95e5fa into main Sep 27, 2023
10 checks passed
@MHHukiewitz MHHukiewitz deleted the mhh-base-client branch September 27, 2023 16:37
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

Successfully merging this pull request may close these issues.

3 participants