Draft
Conversation
Detailed step-by-step example showing how to access AWS S3 from a Python function using boto3. Covers template selection, dependency setup, secret management for AWS credentials, stack configuration, handler implementation with S3 client reuse, and deployment with faas-cli. Signed-off-by: Han Verstraete (OpenFaaS Ltd) <han@openfaas.com>
This comment has been minimized.
This comment has been minimized.
Add a step-by-step example showing how to produce messages to a Kafka topic from a Python function using the confluent-kafka package with SASL/SSL authentication. Covers template selection, dependency setup, secrets configuration, handler implementation with producer reuse, and deployment. Signed-off-by: Han Verstraete (OpenFaaS Ltd) <han@openfaas.com>
AI Pull Request OverviewSummary
Approval rating (1-10)8/10 - Well-structured examples with good practices, but lacks error handling in code samples. Summary per fileSummary per file
Overall AssessmentThe PR successfully adds valuable, practical examples to the Python documentation that will help users implement common integrations. The examples follow security best practices by using secrets for credentials and demonstrate efficient patterns like client reuse. However, the code samples could benefit from basic error handling to make them more robust for production use, though this is acceptable for documentation examples. Detailed ReviewDetailed Reviewdocs/languages/python.mdAWS S3 Example:
Kafka Producer Example:
General Observations:
AI agent details. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add detailed, step-by-step examples to the Python language docs. Examples are added as individual commits.
Examples added so far:
confluent-kafkawith SASL/SSL authentication, including a note on common SASL mechanisms (tested e2e)More examples will be added in follow-up commits.
Motivation and Context
Make it easier for users to get started with common patterns by providing ready-to-use examples in the official documentation.
How Has This Been Tested?
Both examples have been tested end-to-end: functions were built, deployed to a live OpenFaaS cluster, and invoked to verify correct behaviour.
Types of changes
Checklist:
git commit -s