Skip to main content

Botflow

Botflow is a lightweight Python framework for building automation workflows and bots with a focus on simplicity, modularity, and ease of integration.

Features

  • Workflow Management: Define complex bot workflows with simple, declarative syntax
  • Multi-language Support: Built-in i18n support with locale management
  • Resource Management: Centralized handling of styles, assets, and locales
  • Bundle Support: PyInstaller integration for creating standalone executables
  • Qt Integration: PySide6 support for GUI-based automation
  • Configuration: Flexible runtime configuration with environment variables

Quick Start

  1. Install Botflow via pip:

    pip install botflow-gui
    
  2. Create a simple bot workflow:

    from botflow import FlowManager, FlowSpec, TextStepSpec, run_application, run_flow_manager
    
    async def greet_user(ctx):
        name = ctx.data.get('greet_step')
        ctx.logger.info(f'Hello, {name}!')
    
    
    flow = FlowSpec(
        name='simple_flow',
        steps=[
            TextStepSpec(
                key='greet_step',
                title='Greet User',
                placeholder='Enter your name',
            ),
        ],
        on_finish=[greet_user]
    )
    
    
    if __name__ == '__main__':
        run_application()
        flow_manager = FlowManager(flow)
        run_flow_manager(flow_manager, window_title='Simple Flow Manager')
    
  3. (Optional) If you want to customize the resources directory or language, set the following environment variables in your script before importing Botflow:

    import os
    
    os.environ['BOTFLOW_RESOURCES_DIR'] = './custom_resources'
    os.environ['BOTFLOW_LANG'] = 'en_US'
    
    • When you use your own resources directory, Botflow will look for styles, locales, and other assets in the specified path and after that in the default package resources. So you can replace the default resources by providing your own.

      from botflow.resolver import find_resource_file
      
      resource_path = find_resource_file('styles/flow_manager.qss')
      
  4. Run your bot:

    python your_bot_script.py
    

How to create a bundle

To create a standalone executable bundle of your Botflow application, you can use PyInstaller. Follow these steps:

  1. Install PyInstaller:

    pip install pyinstaller
    
  2. Create a spec file for your application. You can generate a default spec file using:

    pyinstaller your_bot_script.py
    
  3. If you are using your own resources (like styles, locales, etc.), make sure to include them in the spec file. You can modify the datas section of the spec file to include your resources directory:

    pyinstaller your_bot_script.py --add-data "path/to/your/resources:resources"
    
  4. If you want to specify a custom resources directory for your bundle, you can set the BUNDLE_RESOURCES_DIR variable in your main script (If you don't set it, it defaults to 'BOTFLOW_RESOURCES_DIR' path if set):

    os.environ['BOTFLOW_BUNDLE_RESOURCES_DIR'] = './custom_resources'
    

Metadata

Release files for botflow-gui 0.0.5

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

Source distribution (sdist)

Source distribution for botflow-gui 0.0.5
File Size Uploaded Provenance Actions
botflow_gui-0.0.5.tar.gz 66.9 kB Without provenance Details for botflow_gui-0.0.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for botflow-gui 0.0.5
File Interpreter ABI Platform Actions
botflow_gui-0.0.5-py3-none-any.whl Python 3 none any Details for botflow_gui-0.0.5-py3-none-any.whl

Total release size: 146.9 kB

Release files / botflow_gui-0.0.5.tar.gz

Download URL botflow_gui-0.0.5.tar.gz
Size 66.9 kB
Tags Source
SHA-256 checksum
How to use checksums
fda356e9f2c5c665d81adde3ac8ba10db28442535d5c6befd05c4e01229b64d5
BLAKE2b-256 checksum
How to use checksums
22a41e95c074019f9b0ba1c9de6d1d5b421a950b5edada3e3bca07b27d707842
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.3

Release files / botflow_gui-0.0.5-py3-none-any.whl

Download URL botflow_gui-0.0.5-py3-none-any.whl
Size 80.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0671f468b814d45033134c5839a517fa9fabac5e17516bd7e9c9b284b476d68f
BLAKE2b-256 checksum
How to use checksums
8e634c788f4b2df9e3ecc56565cf109f4184fddb3553ca7bc57de3ca9f111a9d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.3

Security for botflow-gui 0.0.5

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.

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