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.1.tar.gz (2.6 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.1-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for ventrun-1.1.tar.gz
Algorithm Hash digest
SHA256 b7532b4894b2afe1432341317b57b035282325a15a2c392cff4eb6b01eafe143
MD5 134e93ffd7fa03b625d353c7435b6046
BLAKE2b-256 57822f6fe4a602476e3a94017f7ff7dca89f058c5775e0eaf1fb84c9ce0aff40

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for ventrun-1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bc882415b437c8f7b08f39811ef7909b0fd2a2c089b9304849758038a387b05c
MD5 e5966ff2e7dae2a06f0982097794e2ad
BLAKE2b-256 a2f94dee59b3a38a41d7f5ff4596a3c0efaed2a274cff54afabf2232b456ee0e

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