Skip to main content

Parsenaut

🚀 Parse and launch classes as commands 🚀

📦 Description

Scene-like applications may use inheritance for multiple user-defined classes in local scripts, lacking dynamic entry points and/or needing a path and class name to run. Whether your project looks something like:

from myproject import Scene


class Mandelbrot(Scene):
    """Mandelbrot example"""
    ...

class BurningShip(Scene):
    """Burning Ship example"""
    ...

One might want its usage to follow as:

# Lists all classes
$ myproject --help

📦 Scenes at (/home/user/scenes.py)
• mandelbrot      Mandelbrot example
• burningship     Burning Ship example

# Runs Mandelbrot().cli(*args)
$ myproject mandelbrot (args)

Parsenaut is a safe library for it that:

  • Safe: Files are parsed with stdlib Abstract Syntax Trees and are never executed, saving import times and minimizing security issues in potentially untrusted scripts.
  • Compatible: Works with Cyclopts or Typer command line libraries, at your taste.
  • Flexible: Customizable class tags search, write your own implementation.
  • Fast: Does not spawn a subprocess, uses stdlib runpy

📦 Installation

Simply add the parsenaut package in your pyproject.toml:

[project]
dependencies = ["parsenaut"]

📦 Usage

# myproject/__main__.py
import sys
from pathlib import Path

from parsenaut.cyclopts import Launcher

if __name__ == "__main__":
    launcher = Launcher(keyword="Scene")

    for file in Path.cwd().glob("*.py"):
        launcher.search(file)

    launcher.cli(sys.argv[1:])

Metadata

Release files for parsenaut 0.3.0

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

Built distribution (wheel)

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

Release files / parsenaut-0.3.0-py3-none-any.whl

Download URL parsenaut-0.3.0-py3-none-any.whl
Size 4.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
761216d4e7991d4a9f4b4e78f31c71b9df8d838263c994fc87ac895883f614e2
BLAKE2b-256 checksum
How to use checksums
4af55a26dc5281bb404a277af186c9f8fd202e7e0bf5567ede8e044259579a56
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.

Transparency log

Security for parsenaut 0.3.0

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.

Full provenance

1 file in this release has been uploaded with provenance metadata.

Attestation for parsenaut-0.3.0-py3-none-any.whl

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.

Transparency log

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