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

Add topic producer API Python side #733

Merged
merged 1 commit into from
Nov 22, 2023
Merged

Conversation

cbornet
Copy link
Member

@cbornet cbornet commented Nov 21, 2023

See #649

After that, remaining work for topic producer will be:

  • Support AVRO schema
  • Add e2e tests

"""Write a record to a topic (for async methods)."""
pass

def write_future(self, topic: str, record: Record) -> Future:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestions for a better name ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about "awrite" for the async write and "write" for the sync version ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I've thought of that. Now both methods are kinda "async", one with async/await, the other with Future.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But let's use awrite as it's a defacto convention when 2 methods do the same thing and one does it on the event loop.

@cbornet cbornet force-pushed the python-topic-producer-python-side branch from 2bef373 to c140c87 Compare November 22, 2023 12:09
@cbornet cbornet force-pushed the python-topic-producer-python-side branch from c140c87 to 07d9cab Compare November 22, 2023 12:21
@cbornet cbornet merged commit 00e4415 into main Nov 22, 2023
10 checks passed
@cbornet cbornet deleted the python-topic-producer-python-side branch November 22, 2023 12:59
benfrank241 pushed a commit to vectorize-io/langstream that referenced this pull request May 2, 2024
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.

2 participants