-
Notifications
You must be signed in to change notification settings - Fork 91
docs: add query training guide and custom query example #927
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
base: main
Are you sure you want to change the base?
Conversation
|
[commit-verification-bot] To achieve verified status, please read: Remember, you require a GPG key and each commit must be signed with: Thank you for contributing! From the Hiero Python SDK Team |
|
Hi, this is WorkflowBot.
|
e848dec to
1becd9f
Compare
|
@exploreriii can you check!!! |
Adds detailed documentation for the Query class and a custom query example. Fixes hiero-ledger#910 Signed-off-by: Om7035 <[email protected]>
1becd9f to
0fa5700
Compare
Signed-off-by: Om7035 <[email protected]>
| balance_response = query.execute(client) | ||
|
|
||
| # The response is the raw protobuf object because we didn't override _map_response | ||
| # to convert it to a nice SDK object (like the official AccountBalanceQuery does). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Om7035
We have a problem
We require all our examples to be runnable and 'work'
So, in this case, your a new sample class does not fully run - so the workflow fails
Either make sure that it runs, see
examples/query/account_balance_query.py
or
examples/query/account_balance_query_2.py
and
src/hiero_sdk_python/query/account_balance_query.py
or, add it to your query.md making it clear its a simplified example
|
Hello, this is the Office Hour Bot. This is a reminder that the Hiero Python SDK Office Hours are scheduled in approximately 4 hours (14:00 UTC). This session provides an opportunity to ask questions regarding this Pull Request or receive assistance from a maintainer. Details:
Disclaimer: This is an automated reminder. Please verify the schedule here to be notified of any changes. |
Description:
Adds detailed documentation for the
Queryclass to the SDK developer training guide and includes a code example for creating custom queries.docs/sdk_developers/training/query.mdexplainingQueryarchitecture, execution flow, payment handling, and retry logic.examples/query/custom_query_example.pydemonstrating how to subclassQueryto create a custom implementation.Related issue(s):
Fixes #910
Notes for reviewer:
This PR addresses the need for better internal documentation regarding the
Queryclass. The new guide explains howQueryinherits from_Executableand handles common tasks like node selection and retries. The example scriptcustom_query_example.pyshows a practical implementation ofAccountBalanceQueryas a custom query to illustrate the necessary abstract method implementations.Checklist