Skip to content

chore(example): move getting-started for python sdk - #2094

Merged
spetz merged 3 commits into
apache:masterfrom
changhc:1889-first-example
Aug 11, 2025
Merged

spetz merged 3 commits into
apache:masterfrom
changhc:1889-first-example

Conversation

@changhc

@changhc changhc commented Aug 10, 2025

Copy link
Copy Markdown
Contributor

Description

The first part of #1889.

I'm not sure if the person assigned to the issue is already working on this. It's been several weeks since the last update, so I assume that this is not being worked on at the moment. If it turns out that the person almost has a PR ready, I'll close mine.

This PR basically duplicates the existing Python SDK example and places it in examples/python/getting-started. Main changes:

  • tweaked a few things to make it work with the latest commit 5627b18.
  • added argument parsing to make it align with examples/rust/getting-started.
  • updated some logging levels to make it align with examples/rust/getting-started. Note that the logged messages are not exactly the same as those lines in examples/rust/getting-started, but I consider this rather minor now and therefore leave them as they are.

Note that this PR works with 5627b18 rather than the latest release (0.4.0). I decided not to build against 0.4.0 because the examples will not be aligned with the current rust examples.

There are a few issues in my opinion regarding the setup and target version of iggy in the example:

  • The SDK readme doesn't really help with setting up the SDK. I'm not sure what led to chore(python): rename Python SDK from iggy_py to apache-iggy #2050, but renaming the package pretty much breaks the installation instructions since the package is not yet released under the new name. I had to read the test docker file to understand how to set up everything.
  • I think the team would need a release branch that reflects the latest release. Examples are frozen in that release branch until the next release. This ensures that when a user tries to follow the example, they get consistent and functioning code pinned to a released version. This also allows continuous updates to the examples without breaking the "released" examples.

Testing

  • Manual testing: built iggy locally and ran the example against the local build
  • Formatting: ran ruff

Automated testing will be set up later.

@spetz

spetz commented Aug 10, 2025

Copy link
Copy Markdown
Contributor

Thank you for the contribution! I think that the requirements file needs the ASF license header included too.

@changhc
changhc marked this pull request as ready for review August 10, 2025 14:55
@spetz
spetz merged commit 2e57d58 into apache:master Aug 11, 2025
@changhc
changhc deleted the 1889-first-example branch August 11, 2025 06:49
hageshiame pushed a commit to hageshiame/iggy that referenced this pull request Nov 7, 2025
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