Skip to content

[Good First Issue]: Add module docstring to examples/account/account_allowance_approve_transaction_hbar.pyΒ #1202

@exploreriii

Description

@exploreriii

πŸ†•πŸ₯ First Timers Only

This issue is reserved for people who have never contributed or have made minimal contributions to Hiero Python SDK.
We know that creating a pull request (PR) is a major barrier for new contributors.
The goal of this issue and all other issues in find a good first issue is to help you make your first contribution to the Hiero Python SDK.

πŸ‘Ύ Description of the issue

Our example at
examples/account/account_allowance_approve_transaction_hbar.py
is looking pretty nice

but a new user can benefit from a module docstring that outlines:

πŸ’‘ Proposed Solution

Generate a brief, readable block comment that:
Explains what the example demonstrates at a high level

  • Defines any key concept (e.g., alias, auto account creation) in one short sentence
  • Lists essential steps separately from optional steps
  • Explains why certain transactions are not used, if any
  • Uses plain, narrative language, not tutorial prose
  • Is suitable for developers skimming example code

Constraints:

  • Keep it concise (β‰ˆ10–15 lines total)
  • Use clear bullet numbering where relevant
  • No emojis

πŸ‘©β€πŸ’» Implementation Steps

For example, but please research and imporve it!

You can research about it here
https://docs.hedera.com/hedera/sdks-and-apis/sdks/accounts-and-hbar/approve-an-allowance

sample, must edit to be relevant:
"""
This example demonstrates approving and using an HBAR allowance on the
Hedera network with the Hiero Python SDK.

An HBAR allowance authorizes one account (the spender) to transfer a limited
amount of HBAR from another account (the owner) without taking custody.

Essential steps:

  1. Initialize a client using an existing operator account.
  2. Create two new accounts to act as spender and receiver.
  3. Approve an HBAR allowance from the owner to the spender.
  4. Submit a transfer transaction that consumes the approved allowance.

Optional steps:
5. Log transaction outcomes and account IDs for visibility.

No account creation is performed for the owner, since it already exists and
funds the allowance. The transfer is initiated and paid for by the spender,
illustrating delegated spending rather than direct owner-controlled transfers.
"""

βœ… Acceptance Criteria

To be able to merge a pull request for this issue, we need:

  • Changelog Entry: Correct changelog entry (please link to the documentation - see guide)
  • Signed commits: commits must be DCO and GPG key signed (see guide)
  • All Tests Pass: our workflow checks like unit and integration tests must pass
  • Issue is Solved: The implementation fully addresses the issue requirements as described above
  • No Further Changes are Made: Code review feedback has been addressed and no further changes are requested

πŸ“‹ Step-by-Step Contribution Guide

If you have never contributed to an open source project at GitHub, the following step-by-step guide will introduce you to the workflow.

  • Claim this issue: Comment below that you are interested in working on the issue. Without assignment, your pull requests might be closed and the issue given to another developer.
  • Wait for assignment: A community member with the given rights will add you as an assignee of the issue
  • Fork, Branch and Work on the issue: Create a copy of the repository, create a branch for the issue and solve the problem. For instructions, please read our Contributing guide file. Further help can be found at Set-up Training and Workflow Training.
  • DCO and GPG key sign each commit : each commit must be -s and -S signed. An explanation on how to do this is at Signing Guide
  • Add a Changelog Entry : your pull request will require a changelog. Read Changelog Entry Guide to learn how.
  • Push and Create a Pull Request : Once your issue is resolved, and your commits are signed, and you have a changelog entry, push your changes and create a pull request. Detailed instructions can be found at Submit PR Training, part of Workflow Training.
  • You did it πŸŽ‰: A maintainer or committer will review your pull request and provide feedback. If approved, we will merge the fix in the main branch. Thanks for being part of the Hiero community as an open-source contributor ❀️

IMPORTANT Your pull request CANNOT BE MERGED until you add a changelog entry AND sign your commits each with git commit -S -s -m "chore: your commit message" with a GPG key setup.

πŸ€” Additional Information

For more help, we have extensive documentation attributes:

Additionally, we invite you to join our community on our Discord server.

We also invite you to attend each Wednesday, 2pm UTC our Python SDK Office Hour and Community Calls. The Python SDK Office hour is for hands-on-help and the Community Call for general community discussion.

You can also ask for help in a comment below!

Metadata

Metadata

Assignees

Labels

Good First IssueIssues which are ideal for a first time or new project contributor.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions