Skip to main content

GlassFlow Python Client SDK

Project description



License: MIT Chat on Slack

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:

GlassFlow data pipeline creation

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(space_id="<str value>", 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(space_id="<str value>", 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(space_id="<str value>", 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

GlassFlow Examples

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.

  1. Join the Slack channel.

  2. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

glassflow-1.0.3.tar.gz (14.7 kB view hashes)

Uploaded Source

Built Distribution

glassflow-1.0.3-py3-none-any.whl (16.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page