Skip to main content

Bootstrap your application and emit a Main event to ModuVent.

Project description

Ventrun

Bootstrap your application and emit a Main event to ModuVent.

Overview

Ventrun is a Python library and command-line tool that provides an event-driven framework for registering and executing main program entry points. Built on top of the moduvent event system, it automatically discovers and runs registered events from your project modules, making application initialization and execution more organized and maintainable.

Features

  • Automatic Module Discovery: Scans your project directory and automatically loads Python modules

  • Event-Driven Architecture: Register main entry points as events using a simple decorator

  • Dual Interface: Use as both a command-line tool and a Python library

  • Flexible Path Handling: Works with both absolute and relative paths, with current directory as default

  • Verbose Logging: Optional verbose output for debugging and monitoring

Installation

pip install ventrun

Quick Start

As a Command-Line Tool

# Scan current directory
ventrun

# Scan specific project directory
ventrun /path/to/your/project

# Enable verbose output
ventrun -v /path/to/your/project

As a Python Library

from moduvent import subscribe
from ventrun import Main


@subscribe(Main)
def main(e):
    print("Hello, world!")

For more information about moduvent, see the moduvent documentation.

License

MIT License

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

ventrun-1.7.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

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

ventrun-1.7-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file ventrun-1.7.tar.gz.

File metadata

  • Download URL: ventrun-1.7.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.2

File hashes

Hashes for ventrun-1.7.tar.gz
Algorithm Hash digest
SHA256 5c8d7184c0fd3d8582ecfc1bf0c1a7191e641d622f4f074efb14446552380448
MD5 2d0976235b1af9ae1603277b2cf7e627
BLAKE2b-256 8c2b4263e6ec71822354f9e50b7411257d6aec29535cf68d922303c715f0f01e

See more details on using hashes here.

File details

Details for the file ventrun-1.7-py3-none-any.whl.

File metadata

  • Download URL: ventrun-1.7-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.2

File hashes

Hashes for ventrun-1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 7615a57d3f55158f0191fee93fa7274a54af104e470838bcdc9734149575bb33
MD5 807f5afe9364200745602e2a083ced8f
BLAKE2b-256 067c139d6189a36a0a236f5ac5b291655ff6994686359e5d3a0d4f02810d3611

See more details on using hashes here.

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