GlassFlow Python Client SDK
Project description
GlassFlow Python SDK
The GlassFlow Python SDK provides a convenient way to interact with the GlassFlow API in your Python applications. The SDK is used to publish and consume events to your GlassFlow pipelines.
See how it is easy to setup a new data pipeline and do data transformation with GlassFlow:
Installation
You can install the GlassFlow Python SDK using pip:
pip install glassflow
Available Operations
- publish - Publish a new event into the pipeline
- consume - Consume the transformed event from the pipeline
- consume failed - Consume the events that failed from the pipeline
publish
Publish a new event into the pipeline
Example Usage
import glassflow
client = glassflow.GlassFlowClient()
pipeline_client = client.pipeline_client(pipeline_id="<str value", pipeline_access_token="<str value>")
data = {} # your json event
res = pipeline_client.publish(request_body=data)
if res.status_code == 200:
print("Published sucessfully")
consume
Consume the transformed event from the pipeline
Example Usage
import glassflow
client = glassflow.GlassFlowClient()
pipeline_client = client.pipeline_client(pipeline_id="<str value", pipeline_access_token="<str value>")
res = pipeline_client.consume()
if res.status_code == 200:
print(res.body.event)
consume failed
If the transformation failed for any event, they are available in a failed queue. You can consume those events from the pipeline
Example Usage
import glassflow
client = glassflow.GlassFlowClient()
pipeline_client = client.pipeline_client(pipeline_id="<str value", pipeline_access_token="<str value>")
res = pipeline_client.consume_failed()
if res.status_code == 200:
print(res.body.event)
Quickstart
Follow the quickstart guide here
Code Samples
SDK Maturity
Please note that the GlassFlow Python SDK is currently in beta and is subject to potential breaking changes. We recommend keeping an eye on the official documentation and updating your code accordingly to ensure compatibility with future versions of the SDK.
User Guides
For more detailed information on how to use the GlassFlow Python SDK, please refer to the GlassFlow Documentation. The documentation provides comprehensive guides, tutorials, and examples to help you get started with GlassFlow and make the most out of the SDK.
Contributing
Anyone who wishes to contribute to this project, whether documentation, features, bug fixes, code cleanup, testing, or code reviews, is very much encouraged to do so.
-
Join the Slack channel.
-
Just raise your hand on the GitHub discussion board.
If you are unfamiliar with how to contribute to GitHub projects, here is a Get Started Guide. A full set of contribution guidelines, along with templates, are in progress.
Troubleshooting
For any questions, comments, or additional help, please reach out to us via email at help@glassflow.dev. Please check out our Q&A to get solutions for common installation problems and other issues.
Raise an issue
To provide feedback or report a bug, please raise an issue on our issue tracker.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for glassflow-1.0.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e8bc4118d902d5e8de50c904293ae35e671303df6d8da5987bd99bcadc987da |
|
MD5 | a5176be4c5475cec6084040b08adeefa |
|
BLAKE2b-256 | a9c5f6ae3eb236411d1ae3d64274623c4715654ca90db00407f1dc07b071fba5 |