Skip to main content

Flowstep

Version downloads

codecov Lint workflow

Flowstep is a Python library that provides enhanced control flow functionalities for iterating over iterables. It allows you to pause, resume, skip, or stop the iteration process based on conditions and user interaction.

Key Features:

  • Pause and Resume Iteration: Temporarily halt the iteration and resume at your convenience.
  • Conditional Skipping: Define custom logic to skip specific elements based on your criteria.
  • User Interaction: Interact with the flow during pauses to choose the next action (resume, skip, or stop).
  • Clear Messaging: Receive informative messages during pauses and actions (optional).
  • Context Manager Integration: Use Flowstep within a with statement for easy flow management.

Benefits:

  • Streamline complex iteration logic: Easily manage complex workflows with conditional processing and user interaction.
  • Improve code readability: Separate iteration logic from your core functionality for better maintainability.
  • Enhance user experience: Provide users with control over the processing flow, especially for large datasets.

Installation:

pip install flowstep

Use o código com cuidado.

Usage:

Here's a basic example demonstrating how to use Flowstep to iterate over a list with conditional skipping and informative messages:

from flowstep import Flow

data = [1, 2, 3, 4, 5]
skip_condition = lambda x: x % 2 == 0  # Skip even numbers

with Flow(data, skip_condition=skip_condition, verbose=True) as flow:
  for index, item in flow:
    print(f"Processing item: {item} (Index: {index})")

This code iterates over the data list, skipping even numbers based on the provided skip_condition function. During pauses (triggered by user input), the library will display informative messages to guide the user's choice (resume, skip, or stop).

Contributing:

We welcome contributions to Flowstep! Feel free to submit pull requests for bug fixes, new features, or improvements. Make sure to add appropriate tests and update the documentation request as needed.

License:

Flowstep is distributed under the [License Name] License. See the LICENSE file for details.

Take control of your iterations with Flowstep!

Metadata

Release files for flowstep 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flowstep 0.0.1
File Size Uploaded Provenance Actions
flowstep-0.0.1.tar.gz 6.3 kB Without provenance Details for flowstep-0.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for flowstep 0.0.1
File Interpreter ABI Platform Actions
flowstep-0.0.1-py3-none-any.whl Python 3 none any Details for flowstep-0.0.1-py3-none-any.whl

Total release size: 14.4 kB

Release files / flowstep-0.0.1.tar.gz

Download URL flowstep-0.0.1.tar.gz
Size 6.3 kB
Tags Source
SHA-256 checksum
How to use checksums
22cb8e61fad669381918ec9617a8290c5bf2bbe2a9c136f8d24698f53dddcdbe
BLAKE2b-256 checksum
How to use checksums
27eca87805ecf6e917ea6db2617331f3d8984e47e5ce8e61b715e4bb91d95fd7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.8.10 Linux/5.15.0-106-generic

Release files / flowstep-0.0.1-py3-none-any.whl

Download URL flowstep-0.0.1-py3-none-any.whl
Size 8.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fd49ca26b26de7589d24022b5a1905bfde88917b9689ca9e44f9f12ca18d3d99
BLAKE2b-256 checksum
How to use checksums
2475bb7ae793cb03633c37c1bc1d688eba654c6857968902844e4d44fdc9081e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.8.10 Linux/5.15.0-106-generic

Security for flowstep 0.0.1

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.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page