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. FLUVIO_CLOUD_TEST_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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

fluvio-0.20.0-cp313-cp313-manylinux_2_28_x86_64.whl (5.9 MB view details)

Uploaded CPython 3.13 manylinux: glibc 2.28+ x86-64

fluvio-0.20.0-cp313-cp313-macosx_11_0_arm64.whl (5.7 MB view details)

Uploaded CPython 3.13 macOS 11.0+ ARM64

fluvio-0.20.0-cp313-cp313-macosx_10_13_x86_64.whl (5.7 MB view details)

Uploaded CPython 3.13 macOS 10.13+ x86-64

fluvio-0.20.0-cp313-cp313-macosx_10_13_universal2.whl (11.3 MB view details)

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

fluvio-0.20.0-cp312-cp312-manylinux_2_28_x86_64.whl (5.9 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.28+ x86-64

fluvio-0.20.0-cp312-cp312-macosx_11_0_arm64.whl (5.7 MB view details)

Uploaded CPython 3.12 macOS 11.0+ ARM64

fluvio-0.20.0-cp312-cp312-macosx_10_13_x86_64.whl (5.7 MB view details)

Uploaded CPython 3.12 macOS 10.13+ x86-64

fluvio-0.20.0-cp312-cp312-macosx_10_13_universal2.whl (11.3 MB view details)

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

fluvio-0.20.0-cp311-cp311-manylinux_2_28_x86_64.whl (5.9 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.28+ x86-64

fluvio-0.20.0-cp311-cp311-macosx_11_0_arm64.whl (5.7 MB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

fluvio-0.20.0-cp311-cp311-macosx_10_13_x86_64.whl (5.7 MB view details)

Uploaded CPython 3.11 macOS 10.13+ x86-64

fluvio-0.20.0-cp311-cp311-macosx_10_13_universal2.whl (11.4 MB view details)

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

fluvio-0.20.0-cp310-cp310-manylinux_2_28_x86_64.whl (5.9 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.28+ x86-64

fluvio-0.20.0-cp310-cp310-macosx_11_0_arm64.whl (5.7 MB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

fluvio-0.20.0-cp310-cp310-macosx_10_13_x86_64.whl (5.7 MB view details)

Uploaded CPython 3.10 macOS 10.13+ x86-64

fluvio-0.20.0-cp310-cp310-macosx_10_13_universal2.whl (11.4 MB view details)

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

fluvio-0.20.0-cp39-cp39-manylinux_2_28_x86_64.whl (5.9 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.28+ x86-64

fluvio-0.20.0-cp39-cp39-macosx_11_0_arm64.whl (5.7 MB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

fluvio-0.20.0-cp39-cp39-macosx_10_13_x86_64.whl (5.7 MB view details)

Uploaded CPython 3.9 macOS 10.13+ x86-64

fluvio-0.20.0-cp39-cp39-macosx_10_13_universal2.whl (11.4 MB view details)

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

fluvio-0.20.0-cp38-abi3-manylinux2014_aarch64.whl (6.2 MB view details)

Uploaded CPython 3.8+

fluvio-0.20.0-cp38-abi3-linux_armv7l.whl (5.3 MB view details)

Uploaded CPython 3.8+

fluvio-0.20.0-cp38-abi3-linux_armv6l.whl (5.4 MB view details)

Uploaded CPython 3.8+

File details

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

File metadata

File hashes

Hashes for fluvio-0.20.0-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 df4c7cfc3363083e2c342fc5400b096b686abb9ecd731974375bba00f89a6a4a
MD5 b7b796dd79e489a555d022741191a05e
BLAKE2b-256 2d3750bb1f7b9a766d885bd6ff0230066600e1842388c44e0c61b8b9c6f6ea02

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fluvio-0.20.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a53b74b3e33f756fba42b25443381967bb78091228c8dd7c75a9f6495d25aba9
MD5 b2f2537beb3397df883c1e8235da06f5
BLAKE2b-256 337321fe80cfc05af9d567c414126eb61363680d8a09abdc10c3031959bf7771

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fluvio-0.20.0-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 5577a7cbdd97392a5bf6098c7ea79f6fe627932ef2f115153b972e9983f4d10f
MD5 558f6c99934d7f74f305ad7e621cb483
BLAKE2b-256 37e50ff42cb05f25336b4d5b43ab753c19a04f18b7e41c64dd32163d31c15d51

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fluvio-0.20.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 a2303115cee1ca49dc2c0f283702e0d1754af01b962c7c37080c52cbcb482096
MD5 258f1d3a4ae07b11fa29e8c2cc0e389e
BLAKE2b-256 66a65ee8daedca5e1626d9df9aeeb3e40cb966f47884e57df5ca9449cce74552

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fluvio-0.20.0-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f83d1c0f29a3bee8d18c7f3f164d0c4b5a132df53f43553449c20cd84d39f4c2
MD5 8d6e38d0e725250ee44538336352ce2e
BLAKE2b-256 04459f0dc8f9ad83e16458709ec70788fd24912243fc5c409bf1809f5d329ecd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fluvio-0.20.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 cc67d67f70b7b99bd23e999d63fe2f55cc0e75e56250aaea818b7193734a9678
MD5 9f1a11f822b3ebc6e3dbbd8e9c31c564
BLAKE2b-256 5af332c493cf850b7739d868772524f7d7edb20fddb988c71c13c6e2272115b6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fluvio-0.20.0-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 d945f0f7380d4aa8aff7eb65971303321005bd54f7cf571a6d464c3dc6d5f957
MD5 8ad80d578b0789b0549560d54b95d8a3
BLAKE2b-256 32cb45ab4878bf8867438e98e7fb3752256b3551ca373256b42e449821a95e3d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fluvio-0.20.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 6efa8ff28076b3567166f86b3119f69e1f3f85bf230f90df8b21067f140f2b67
MD5 24310148e3294fa224f9b8f21b4d328f
BLAKE2b-256 1d76eaa5ea7e9e1914a9f668fe4be0b09917d4de516d877083d4c118d40cfe3e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fluvio-0.20.0-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 65fdc429c70ee17d538f966bbb873980ed53db4b72a056e17391025cb5a1bbda
MD5 f19325ae9c25c7c4321e78a866957982
BLAKE2b-256 35b8f1e5ea56a3f38a82fe85df812c08ed288f5486c9a5b223b497dc73972c16

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fluvio-0.20.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c425e5a43704859adafd78addaad5741524938aa1948760210b361598379efb8
MD5 4eb50c670d066c59ea0b2ddf28a26581
BLAKE2b-256 bb2cde0381812a340de5548c4e69a886c312a14d0160a9b82950f07e2a6d86b4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fluvio-0.20.0-cp311-cp311-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 90b115d5b0402dff4b6399bd3df7356ff155252a9050692f4f75750c42007c5e
MD5 a6bf852576d0f12189c8b03194d6941f
BLAKE2b-256 de843bae7a0dbb9b8da703e7a5ce71c612ca1dc811a5f99cd8f92dcb5e4acec1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fluvio-0.20.0-cp311-cp311-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 be934c10a2d710ab7a6626625b473c0c683cf0674b79884fe4e59a3df4d6941d
MD5 f068f11e4801bb070ef9dc1d55a90e51
BLAKE2b-256 f88cb851b19846c742d39138975a8c4e56de1525163d5bb8e708b1c83c547bab

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fluvio-0.20.0-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 bdc844553a07aac0e0f7423138b057e5291b46d62529bcb0c9ba63b0549e1945
MD5 739971ab600c08a1325f72839b6e76c9
BLAKE2b-256 a59161cf2e2a1eeb4a4706d194bac883b74fe5d316d19b5b0ae8ac13b2c12f17

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fluvio-0.20.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 061b4361ae762130ab3fef66eaf47cf2d27e166e211e40f1bb8982d30e7a2f7b
MD5 97978c43e7e3f5f154971eb3ffbb88d9
BLAKE2b-256 3e6dd9e7dc3e84f3bf166c5d8b7c3d350469f560b211ac00271e13550beae363

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fluvio-0.20.0-cp310-cp310-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 950b6b03bef19aeee5f15e3e2a7a76092f71fb81f61d335d09ecce98f3f28b7d
MD5 ab627e9e5c5a10b0a3daea3236128e9e
BLAKE2b-256 65db9a9fa3974a4bce4ec065e3c4fd93c4991e480fcb359fe7e0d226f0557bfd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fluvio-0.20.0-cp310-cp310-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 d553ad8f836ad2dcb06f0989c4deb1acc20bb417700e68beab799b6ddba79967
MD5 991c51173b1dba796049d0b162708b37
BLAKE2b-256 2043c33b796b2c2549ec284cbb395b02574a7d630a62941a33546f045974c8a9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fluvio-0.20.0-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 cbf10a56616b0df440c173b10c987bb1897b16031a1925e9dfc8f7e6ab1b7cb1
MD5 4b6e37fa691f0390601caa2a8d2ad0fd
BLAKE2b-256 8f3a33e676e28e1bf89689edd2c197dd1234afc5d424b7e0eb2ede50f766fcd4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fluvio-0.20.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e681a10d21d066ac64ddd0ab4e6e0ce0adb97171e5d226db0c869eb4f9301944
MD5 ff774fd94bce939bbdeb0f006f81d826
BLAKE2b-256 ac2467c72bf5418a1276e867e7e4c21f9d2cfd77d4a149e2fc77902d4c30c0d1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fluvio-0.20.0-cp39-cp39-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 306c8c470696d566d8c9c296683d0673d52b7e64f6fa6140ba324fa08c6359e8
MD5 5b2c8c862c0ec09e08228400a04ae477
BLAKE2b-256 5bbb4098337fd8b5be3e7b07b2674f441fd3204b58b3dcf560e7f21b191c35c9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fluvio-0.20.0-cp39-cp39-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 3e9bbe2834254943fd9db483b0e38f3a291927223862fdb381c40cb62f3072b0
MD5 4d765e5fbbdf8532d78be8f5982398c1
BLAKE2b-256 a8dcb68698d8cb662669fd679b27187989fc63e71434569cfc354e648fccfd34

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fluvio-0.20.0-cp38-abi3-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 fc866e9abe5166ef0a9c9083c1fed2db52b0d0874b72efa328ebe0864da333bc
MD5 39b673633e66fd9bc09d2e0be58e5b90
BLAKE2b-256 2f60b5c8f1069e0551565a0d118255e5252f60bb63a3711c32c0a5fd601ee0d7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fluvio-0.20.0-cp38-abi3-linux_armv7l.whl
Algorithm Hash digest
SHA256 fa14e0b7a28decb6b6ca3ee32a2267b3bfd88fe60577df301fabc78d4254ff22
MD5 945a248cd475552d8091013d88346882
BLAKE2b-256 2e3f5807f1c0273ba74b39766cd29ab68c851e189e6a7d83a775d06f319fa828

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fluvio-0.20.0-cp38-abi3-linux_armv6l.whl
Algorithm Hash digest
SHA256 7c7e041fa23297d7c116a7a6ad1f5ec705c791b62a26bfe728d0e109df567ecd
MD5 5281f567727e28d8e4b64ecea4d74bc3
BLAKE2b-256 9acfb9830f774c9016cc377cbba7aff947d5676073b93e61b929ed3dc5dcb033

See more details on using hashes here.

Supported by

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