Flowise SDK - Python
The Flowise SDK for Python provides an easy way to interact with the Flowise API for creating predictions, supporting both streaming and non-streaming responses. This SDK allows users to create predictions with customizable options, including history, file uploads, and more.
Features
- Support for streaming and non-streaming API responses
- Ability to include message history and file uploads
Installation
You can install the SDK via pip:
pip install flowise
Upgrade version:
pip install --upgrade flowise
Example
from flowise import Flowise, PredictionData, IMessage, IFileUpload
def example_non_streaming():
# Initialize Flowise client
client = Flowise()
# Create a prediction without streaming
completion = client.create_prediction(
PredictionData(
chatflowId="abc",
question="What is the capital of France?",
streaming=False # Non-streaming mode
)
)
# Process and print the full response
for response in completion:
print("Non-streaming response:", response)
def example_streaming():
# Initialize Flowise client
client = Flowise()
# Create a prediction with streaming enabled
completion = client.create_prediction(
PredictionData(
chatflowId="abc",
question="Tell me a joke!",
streaming=True # Enable streaming
)
)
# Process and print each streamed chunk
print("Streaming response:")
for chunk in completion:
print(chunk)
if __name__ == "__main__":
# Run the non-streaming example
example_non_streaming()
# Run the streaming example
example_streaming()
Build & Publish
- Increment version on
setup.py pip install wheelpython setup.py sdist bdist_wheeltwine upload --skip-existing dist/*
Metadata
Release files for flowise 1.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| flowise-1.0.4.tar.gz | 4.0 kB | Without provenance | Details for flowise-1.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| flowise-1.0.4-py3-none-any.whl | Python 3 | none | any | Details for flowise-1.0.4-py3-none-any.whl |
Total release size: 8.2 kB
Release files / flowise-1.0.4.tar.gz
| Download URL | flowise-1.0.4.tar.gz |
|---|---|
| Size | 4.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a1a155787cda477402537af88f9dad8716ccc9b15b80ec80f68dd209c20f11b8
|
|
BLAKE2b-256 checksum How to use checksums |
c31b5ae9df6eda4e5c4934ab11cdacaf8e409e09d7f9baa0012c1caa10537c34
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.10.11
|
Release files / flowise-1.0.4-py3-none-any.whl
| Download URL | flowise-1.0.4-py3-none-any.whl |
|---|---|
| Size | 4.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
013767dbebcccb6540735723022a2474543c8ea3d73e46b957b759f14c46fd2d
|
|
BLAKE2b-256 checksum How to use checksums |
b93e5b99fc503a99c4cb461977b9f13da3b8411bfcf132b0b545e067e187881b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.10.11
|
Security for flowise 1.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.