Skip to main content

Python client library for Fluvio

Project description

Fluvio Client for Python

Python binding for Fluvio streaming platform.

Build License PyPi

Documentation

Fluvio client uses pdoc to generate the client API documentation.

Installation

pip install fluvio

This will get the wheel for the os/architecture of the installation system if available, otherwise it will try to build from source. If building from source, you will need the rust compiler and maybe some operating system sources.

Example Usage

Creating a Topic

fluvio_admin = FluvioAdmin.connect()
fluvio_admin.create_topic("a_topic")

Or just create a topic with custom settings:

import fluvio

fluvio_admin = FluvioAdmin.connect()
topic_spec = (
    TopicSpec.create()
    .with_retention_time("1h")
    .with_segment_size("10M")
    .build()
)
fluvio_admin.create_topic("a_topic", topic_spec)

Producer

from fluvio import Fluvio
fluvio = Fluvio.connect()
producer = fluvio.topic_producer('my-topic')
producer.send_string("FOOBAR")
producer.flush()

Consumer

from fluvio import (Fluvio, Offset)
fluvio = Fluvio.connect()
consumer = fluvio.partition_consumer('my-topic', 0)
stream = consumer.stream(Offset.beginning())

for i in stream:
    print(i.value_string())

Developer Notes

This project uses PyO3 to wrap the fluvio crate.

setuptools-rust bundles it into a python package. For cross platform builds, cibuildwheel is used.

Running the tests locally require having already setup a fluvio locally or on fluvio cloud.

Add python unit tests in the tests directory using the built in python unittest framework

You should probably stick to using make integration-tests which will create the virtual environment and install the package in the site-packages in the venv directory. This makes sure that the package is also packaged correctly.

If you'd like more rapid testing, once you've got the virtual environment activated, python setup.py test will compile the rust as a static library and put it as fluvio/fluvio_python.cpython-39-x86_64-linux-gnu.so. This filename is dependent on the host OS and python version. CLOUD_USER_PASSWORD` to your fork's secrets.

When submitting a PR, CI checks a few things:

  • make integration-tests against a fluvio cluster in CI.
  • make macos-ci-tests with no fluvio cluster present (the macOS github runner is flakey) to verify linking is done correctly.
  • make lint. This checks that cargo fmt, flake8 and black are all clear.

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

fluvio-0.21.0.tar.gz (61.7 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

fluvio-0.21.0-cp313-cp313-manylinux_2_28_x86_64.whl (6.5 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

fluvio-0.21.0-cp313-cp313-macosx_11_0_arm64.whl (6.3 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

fluvio-0.21.0-cp313-cp313-macosx_10_13_x86_64.whl (6.3 MB view details)

Uploaded CPython 3.13macOS 10.13+ x86-64

fluvio-0.21.0-cp313-cp313-macosx_10_13_universal2.whl (12.6 MB view details)

Uploaded CPython 3.13macOS 10.13+ universal2 (ARM64, x86-64)

fluvio-0.21.0-cp312-cp312-manylinux_2_28_x86_64.whl (6.5 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

fluvio-0.21.0-cp312-cp312-macosx_11_0_arm64.whl (6.3 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

fluvio-0.21.0-cp312-cp312-macosx_10_13_x86_64.whl (6.3 MB view details)

Uploaded CPython 3.12macOS 10.13+ x86-64

fluvio-0.21.0-cp312-cp312-macosx_10_13_universal2.whl (12.6 MB view details)

Uploaded CPython 3.12macOS 10.13+ universal2 (ARM64, x86-64)

fluvio-0.21.0-cp311-cp311-manylinux_2_28_x86_64.whl (6.5 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

fluvio-0.21.0-cp311-cp311-macosx_11_0_arm64.whl (6.3 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

fluvio-0.21.0-cp311-cp311-macosx_10_13_x86_64.whl (6.3 MB view details)

Uploaded CPython 3.11macOS 10.13+ x86-64

fluvio-0.21.0-cp311-cp311-macosx_10_13_universal2.whl (12.6 MB view details)

Uploaded CPython 3.11macOS 10.13+ universal2 (ARM64, x86-64)

fluvio-0.21.0-cp310-cp310-manylinux_2_28_x86_64.whl (6.5 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

fluvio-0.21.0-cp310-cp310-macosx_11_0_arm64.whl (6.3 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

fluvio-0.21.0-cp310-cp310-macosx_10_13_x86_64.whl (6.3 MB view details)

Uploaded CPython 3.10macOS 10.13+ x86-64

fluvio-0.21.0-cp310-cp310-macosx_10_13_universal2.whl (12.6 MB view details)

Uploaded CPython 3.10macOS 10.13+ universal2 (ARM64, x86-64)

fluvio-0.21.0-cp39-cp39-manylinux_2_28_x86_64.whl (6.5 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.28+ x86-64

fluvio-0.21.0-cp39-cp39-macosx_11_0_arm64.whl (6.3 MB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

fluvio-0.21.0-cp39-cp39-macosx_10_13_x86_64.whl (6.3 MB view details)

Uploaded CPython 3.9macOS 10.13+ x86-64

fluvio-0.21.0-cp39-cp39-macosx_10_13_universal2.whl (12.6 MB view details)

Uploaded CPython 3.9macOS 10.13+ universal2 (ARM64, x86-64)

fluvio-0.21.0-cp38-abi3-manylinux2014_aarch64.whl (6.9 MB view details)

Uploaded CPython 3.8+

fluvio-0.21.0-cp38-abi3-linux_armv7l.whl (6.0 MB view details)

Uploaded CPython 3.8+

fluvio-0.21.0-cp38-abi3-linux_armv6l.whl (6.1 MB view details)

Uploaded CPython 3.8+

File details

Details for the file fluvio-0.21.0.tar.gz.

File metadata

  • Download URL: fluvio-0.21.0.tar.gz
  • Upload date:
  • Size: 61.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for fluvio-0.21.0.tar.gz
Algorithm Hash digest
SHA256 0442033af026f03965a9f5c189caf340d8515eefc840d430c6eb11412827b5e4
MD5 667ca0f164e626cac86508ba0c4a4c74
BLAKE2b-256 265f663f51ba539a63c8adb6875c143feb2f034579fd24083a58854d5dc23a79

See more details on using hashes here.

File details

Details for the file fluvio-0.21.0-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for fluvio-0.21.0-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9cb58757584149db6e4ac36f80cd0532b7ccc34a510c640edf550c16c7b676cf
MD5 b4d14416b37bd6cafa7e6de729170d15
BLAKE2b-256 2717bfc49ac4f58df124d398a2b6fb6c77f637de40eb46295226883217013562

See more details on using hashes here.

File details

Details for the file fluvio-0.21.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for fluvio-0.21.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8accacdd42609c807b7c166f727cbac1ae061e9317651d262bff1076fe27fdc0
MD5 de982de0a762eff7805ae01e3617ee91
BLAKE2b-256 715f90faaf00aec3118750f559d24f5cdc45cdc5e0beee98e47a9b05ad7241c4

See more details on using hashes here.

File details

Details for the file fluvio-0.21.0-cp313-cp313-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for fluvio-0.21.0-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 373f9d18090594f311d730060371936af1ae1d5d69f1ab6e6e4e01c47a698dfc
MD5 475744809b04dd4b88acc33392f391db
BLAKE2b-256 b269603170637c05476eac97fcbce0488f933d2c1d33a8abda818f1f5ecf610a

See more details on using hashes here.

File details

Details for the file fluvio-0.21.0-cp313-cp313-macosx_10_13_universal2.whl.

File metadata

File hashes

Hashes for fluvio-0.21.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 d56f9d705c13ef45d2a019e53636171cbc38edaa7063fa5c0afe61744610e48d
MD5 26b5010c101a4c0339ab0c9c53a1a03d
BLAKE2b-256 96839b008537fc6843e21bd5be665b2a265cd873afee3db2e31a9cf12ac36298

See more details on using hashes here.

File details

Details for the file fluvio-0.21.0-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for fluvio-0.21.0-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 21e966b282add7f79e45b1b3eaf646f42d955748a169a98b0bb92b0be7554494
MD5 a3ee19410bc6f770cf44637afc43b9d5
BLAKE2b-256 5d3dece96622858276a1b5c2a93c9fff107d2af90c347074690d7d50c46d1863

See more details on using hashes here.

File details

Details for the file fluvio-0.21.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for fluvio-0.21.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 78dcbdf1d308a369ff19371c3518ea992732becce4b3ed8858af76c6f98f6ecc
MD5 82e4519264d0321fffac0e04348bced9
BLAKE2b-256 9f88a4c58d08fbff7659c05bfa1a34457f7b5bfcca32d2c83aeb36526d0588ae

See more details on using hashes here.

File details

Details for the file fluvio-0.21.0-cp312-cp312-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for fluvio-0.21.0-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 6c1d873bef41d932c664b484f8507fa82c9588e871bfc3ab526084b8d10a3df4
MD5 675c05519f7fae32f8331c51834f9846
BLAKE2b-256 c013be5b9379f55dc33c229f333651790ace03ad9ee4f2acad40a6e079d4d684

See more details on using hashes here.

File details

Details for the file fluvio-0.21.0-cp312-cp312-macosx_10_13_universal2.whl.

File metadata

File hashes

Hashes for fluvio-0.21.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 37fcc80b320732f6ea5012adc06af71577af0cdb59df81a323060b82e87d8a29
MD5 37e2b403e24b9f82a4d5ef1e441b0831
BLAKE2b-256 2e6ac781b0deed1d18a51d4c5ef0e8ea1b088ec1ab0ae6f885bb2779b4e5040c

See more details on using hashes here.

File details

Details for the file fluvio-0.21.0-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for fluvio-0.21.0-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b1949cefc23a595e65fa62802b44a14ce90a50a0e7992a95455edbdf990badd0
MD5 f39e2d3891de9c04fef35b173accc4e3
BLAKE2b-256 c24d1ab067680f76fbd550dbf93934c2256c40e04dab8198811009dd88b6e940

See more details on using hashes here.

File details

Details for the file fluvio-0.21.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for fluvio-0.21.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c26c503f9e870a3456ceca2b9cdcd67d0a0f3c44b85d6b80d2a9a84cb7162523
MD5 6434645a0b92ca037634e53cb4fc1e78
BLAKE2b-256 45e2632cda2ceca717ea643838771aa049f91f874523a147d84ff516ff6d58b9

See more details on using hashes here.

File details

Details for the file fluvio-0.21.0-cp311-cp311-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for fluvio-0.21.0-cp311-cp311-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 4760fb87925750e2b8d83cbc7e8a8a9213154260f9f2b73018f3fa64e697ea7a
MD5 4b2a1cf75904341073360bb8bd6d7dcf
BLAKE2b-256 69dc05a54f2b8f8790ff73f36c964cd4163e9e3da3be2fa374b5527246a22c9f

See more details on using hashes here.

File details

Details for the file fluvio-0.21.0-cp311-cp311-macosx_10_13_universal2.whl.

File metadata

File hashes

Hashes for fluvio-0.21.0-cp311-cp311-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 a9eb8c564bb7370d3fe45bd2e92092dc1c0a951385173f6e013b9928db59aa76
MD5 18b580e557067d9a7f7129f683cbaefd
BLAKE2b-256 fc0f3171db1034b8ba874f9e7e67d0ae2cfd0383599f2b6faf7887ac7d6fead1

See more details on using hashes here.

File details

Details for the file fluvio-0.21.0-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for fluvio-0.21.0-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 832b1f036daca91edb6c1fc96928c68c78bc0b2c32807358553ca84cfda7efcc
MD5 4e850a11b0c5c4af7482c0c51cfb5e36
BLAKE2b-256 5ad9b4cbddccf6f6f71e37b2f1219455b5624e9c52c5097d2f2b60905ec9243a

See more details on using hashes here.

File details

Details for the file fluvio-0.21.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for fluvio-0.21.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a95a45c74e9cbbc0adef451727e8f14854944f6f69447fc62a10c27caa029069
MD5 1f3fb7216f1bb5a9b073ea1144c54495
BLAKE2b-256 941a3d1d4af711eced91918b04667c08736be1bd4e1bce595d97bdc5b5973f31

See more details on using hashes here.

File details

Details for the file fluvio-0.21.0-cp310-cp310-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for fluvio-0.21.0-cp310-cp310-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 faf5ecec1af1284865084f91a5c3bfe565e1b501a45122b66e4f2febc290ce1a
MD5 5b5e5b3f96453db835b2065d4b515347
BLAKE2b-256 13ebbeb83996ccf1fed5bc5d8d2c9ca57bf4845b5c902191e47b640acdef926e

See more details on using hashes here.

File details

Details for the file fluvio-0.21.0-cp310-cp310-macosx_10_13_universal2.whl.

File metadata

File hashes

Hashes for fluvio-0.21.0-cp310-cp310-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 9f50e84074b09a85e0096b6b93ef76e7ef002002bc4ac82ac358b905ea17f110
MD5 986c782f428174108e7198b636a77e78
BLAKE2b-256 2adb1b634520f71401ec95d2e321cbaeafd3d9c685c17c841efac15e57154e41

See more details on using hashes here.

File details

Details for the file fluvio-0.21.0-cp39-cp39-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for fluvio-0.21.0-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 0a24750682c6967b614ead9b71899682b77c3a1181d3dbb838ba4347afcbfd10
MD5 36be256efa60eff694f441258a41e310
BLAKE2b-256 4c5f306df6e84db1b5194edfb9c586fdc88de34f72967a1abf2765a4c002b60c

See more details on using hashes here.

File details

Details for the file fluvio-0.21.0-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for fluvio-0.21.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 bc6b61071558e790f240cd55534b8066cc24a4aa767bd33cf7e76b2c8572f3fb
MD5 27a42714b9e935946405fa67ef660fa1
BLAKE2b-256 457699045ca8f1485f85ea8ba18a012b363fea7477b7895f750307e3e2aa3d18

See more details on using hashes here.

File details

Details for the file fluvio-0.21.0-cp39-cp39-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for fluvio-0.21.0-cp39-cp39-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 b2be812a6f3bae3aa02fb8ed90be00f9401a75e00dfee2b4150c1b2c43e67136
MD5 c441df310c627f47aaa698617db9dda3
BLAKE2b-256 251abfdd6a5aad6912c38e3858220df459fe0cf671d820379498b351f9e55d63

See more details on using hashes here.

File details

Details for the file fluvio-0.21.0-cp39-cp39-macosx_10_13_universal2.whl.

File metadata

File hashes

Hashes for fluvio-0.21.0-cp39-cp39-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 ef9cf9891dfdbb490fafb51233f903a5cf31dacdd422e02f4823f8a3a150ac90
MD5 cb445f71397ba4bc456bbc3cffb36ab7
BLAKE2b-256 b71ad101d3454b3e4b3fc1c9e7eeffe5672ea16d4bc0298f3ed7a39b8d7006be

See more details on using hashes here.

File details

Details for the file fluvio-0.21.0-cp38-abi3-manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for fluvio-0.21.0-cp38-abi3-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 e488785783354da544c52b4f43f7ec9296a6348638cd9d3fd456b7de42eb872c
MD5 60a61bdd7a2858b81c48d4456f443c50
BLAKE2b-256 c0b4e7e38dc713f8ee0e378bb5c847648b664ce1eb958dca726851d7e0594c59

See more details on using hashes here.

File details

Details for the file fluvio-0.21.0-cp38-abi3-linux_armv7l.whl.

File metadata

File hashes

Hashes for fluvio-0.21.0-cp38-abi3-linux_armv7l.whl
Algorithm Hash digest
SHA256 ea00f45ccad566cbba2a9bd46ab134fe88e36617a9807e3ed1e302b8ffea6b15
MD5 c783fdc450d0d671b9dbc11daf42a675
BLAKE2b-256 73e7c8ec3b255a5938a053c25f8a6e7c9ecf5795527daf66ffc14aba84dfcdf1

See more details on using hashes here.

File details

Details for the file fluvio-0.21.0-cp38-abi3-linux_armv6l.whl.

File metadata

File hashes

Hashes for fluvio-0.21.0-cp38-abi3-linux_armv6l.whl
Algorithm Hash digest
SHA256 c1b35c3696a39fec784e748b2d5cf8e6325136a054bce8307b0a9159bfca7189
MD5 f9a5893b9bc4cf1e71e25650f789ff01
BLAKE2b-256 976b036d6c6069d2fd2db1667511c85aa8284fe2f290af2286349fe6091852a8

See more details on using hashes here.

Supported by

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