Skip to main content

Utilities for streaming data analytics with Kafka and DuckDB.

Project description

datafun-streaming

Adaptive Interfaces PyPI Docs Site Repo Python 3.15+ License: MIT

CI Docs Links

Shared Python utilities for Kafka, DuckDB, validation, stats, and visualization across streaming data analytics projects.

Command Reference

Show command reference

In a machine terminal

Open a machine terminal where you want the project:

git clone https://github.com/denisecase/datafun-streaming

cd datafun-streaming
code .

In a VS Code terminal

# reset uv cache only after suspected cache corruption or strange dependency errors
# uv cache clean

uv self update
uv python pin 3.14
uv sync --extra dev --extra docs --upgrade

uvx pre-commit install

git add -A
uvx pre-commit run --all-files
# repeat if changes were made
git add -A
uvx pre-commit run --all-files

# do chores
uv run python -m ruff format .
uv run python -m ruff check . --fix
uv run python -m pyright
uv run python -m pytest
uv run python -m zensical build

# save progress
git add -A
git commit -m "update"
git push -u origin main

Notes

  • Use the UP ARROW and DOWN ARROW in the terminal to scroll through past commands.
  • Use CTRL+f to find (and replace) text within a file.
  • You do not need to add to or modify tests/. They are provided for example only.
  • Many files are silent helpers. Explore as you like, but nothing is required.
  • You do NOT not to understand everything; understanding builds naturally over time.

Troubleshooting >>> or

If you see something like this in your terminal: >>> or ... You accidentally started Python interactive mode. It happens. Press Ctrl+c (both keys together) or Ctrl+Z then Enter on Windows.

Example Output

| INFO | P01 | ========================
| INFO | P01 | START main()
| INFO | P01 | ========================
| INFO | P01 | ROOT_DIR = .
| INFO | P01 | DATA_DIR = data
| INFO | P01 | OUTPUT_CSV = data\sales.csv
| INFO | P01 | Streaming 3 sales to C:\Repos\streaming\datafun-streaming\data\sales.csv ...
| INFO | P01 | Watch each sale arrive. Press CTRL+C to stop early.

| INFO | P01 | (1, 81.87, 'Backpack', 'East')
| INFO | P01 | Generated formatted multi-line SUMMARY string.
| INFO | P01 | Returning the str to the calling function.
| INFO | P01 |
    Descriptive Statistics for Streaming Sales Amounts ($):
        Count of sales   : 1
        Minimum sale     : $81.87
        Maximum sale     : $81.87
        Average sale     : $81.87
        Standard deviation: $0.00

| INFO | P01 | (2, 101.58, 'Water Bottle', 'North')
| INFO | P01 | Generated formatted multi-line SUMMARY string.
| INFO | P01 | Returning the str to the calling function.
| INFO | P01 |
    Descriptive Statistics for Streaming Sales Amounts ($):
        Count of sales   : 2
        Minimum sale     : $81.87
        Maximum sale     : $101.58
        Average sale     : $91.72
        Standard deviation: $13.94

| INFO | P01 | (3, 27.15, 'Running Shoes', 'East')
| INFO | P01 | Generated formatted multi-line SUMMARY string.
| INFO | P01 | Returning the str to the calling function.
| INFO | P01 |
    Descriptive Statistics for Streaming Sales Amounts ($):
        Count of sales   : 3
        Minimum sale     : $27.15
        Maximum sale     : $101.58
        Average sale     : $70.20
        Standard deviation: $38.56

| INFO | P01 | ========================
| INFO | P01 | Producer executed successfully!
| INFO | P01 | ========================

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

datafun_streaming-0.1.0.tar.gz (25.2 kB view details)

Uploaded Source

Built Distribution

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

datafun_streaming-0.1.0-py3-none-any.whl (25.2 kB view details)

Uploaded Python 3

File details

Details for the file datafun_streaming-0.1.0.tar.gz.

File metadata

  • Download URL: datafun_streaming-0.1.0.tar.gz
  • Upload date:
  • Size: 25.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for datafun_streaming-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ffe675bfc3b17b16019023b872d96aef0124ecda5c312e2e0ef5d42a77aad99a
MD5 1f849a25f46b65df8855bee4de0c48f2
BLAKE2b-256 37df9cacf7151b3d5dd4134ecb05bc2e42b788fc8670ad20b591948c83ed9495

See more details on using hashes here.

Provenance

The following attestation bundles were made for datafun_streaming-0.1.0.tar.gz:

Publisher: release-pypi.yml on denisecase/datafun-streaming

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file datafun_streaming-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for datafun_streaming-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ebb7a2817b19cec544ffbdad38e5c9956266b3c794454091387aea19d63fa534
MD5 3a032a11df5e2e38894df77efb672d0b
BLAKE2b-256 b924ae35e28643358619709020d34e5ab6bacee9369e8e99292b359e130bc3c9

See more details on using hashes here.

Provenance

The following attestation bundles were made for datafun_streaming-0.1.0-py3-none-any.whl:

Publisher: release-pypi.yml on denisecase/datafun-streaming

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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