Stateful operators that have timeout parameters.
Project description
Bytewax Stateful Timeout
Works similar to bytewax.operators.stateful_flat_map,
but will discard the state if no value is seen for a key after a
timeout. Just before a discard due to timeout, on_timeout is
called and allows you to emit items downstream referencing just
the state.
All keys' state times out on EOF and when on_timeout is called.
Setting up the project for development
Install just
We use just as a command runner for
actions / recipes related to developing Bytewax. Please follow the
installation
instructions.
There's probably a package for your OS already.
Install pyenv and Python 3.12
I suggest using pyenv
to manage python versions.
the installation instructions.
You can also use your OS's package manager to get access to different Python versions.
Ensure that you have Python 3.12 installed and available as a "global
shim" so that it can be run anywhere. The following will make plain
python run your OS-wide interpreter, but will make 3.12 available
via python3.12.
$ pyenv global system 3.12
Install uv
We use uv as a virtual
environment creator, package installer, and dependency pin-er. There
are a few different ways to install
it,
but I recommend installing it through either
brew on macOS or
pipx.
Development
We have a just recipe that will:
-
Set up a venv in
venvs/dev/. -
Install all dependencies into it in a reproducible way.
Start by adding any dependencies that are needed into pyproject.toml or into requirements/dev.in if they are needed for development.
Next, generate the pinned set of dependencies with
> just venv-compile-all
Create and activate a virtual environment
Once you have compiled your dependencies, run the following:
> just get-started
Activate your development environment and run the development task:
> . venvs/dev/bin/activate
> just develop
License
Bytewax Stateful Timeout is commercially licensed with publicly available source code. Please see the full details in LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bytewax_stateful_timeout-0.1-py3-none-any.whl.
File metadata
- Download URL: bytewax_stateful_timeout-0.1-py3-none-any.whl
- Upload date:
- Size: 17.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
34a4bbbe97dd8540f61c97f973979957760bdae938ab551d2896f9f6d538da84
|
|
| MD5 |
ddf84b6569ea09c45e3953ec5120942e
|
|
| BLAKE2b-256 |
935096a6e221c0397fb5af62e40c2dea922892ff5b7723e0e1437b0fb179aca8
|