Skip to main content

Argsrun

Simple tool for creating pluggable commands and sub-commands.

Usage example:

# in setup.py of your project specify argsrun entry point in console scripts
# and provided commands as follows:

setup(name="MyProj",
      # ...
      entry_points={
        'console_scripts': [
            'myproj = argsrun:main',  # argsrun will handle main command
        ],
        'myproj': [                   # ...and lookup for this subcommands
            'main = myproj:main',
            'run = myproj.module:run',
        ],
      })

In case you have several packages/projects and you want them to share same entry point, you can easily do it like follows:

# my-frontend-app/setup.py

setup(name="MySite Frontend",
      entry_points={
        'console_scripts': [
            'mysite = argsrun:main',
        ],
        'mysite': [
            'serve-frontend = frontend:serve',
        ]
      })

# my-backend-app/setup.py

setup(name="MySite Admin backend",
      entry_points={
        'console_scripts': [
            'mysite = argsrun:main',
        ],
        'mysite': [
            'serve-admin = backend:serve',
        ]
      })

 # In my-frontend-app/frontend/__init__.py

 import argsrun

 def handler(options):
     # Run frontend app
     pass

 def parser_setup(ap):
     ap.add_argument('--port', help="Port to bind to")

 main = argsrun.Entry(handler, parser_setup)

Metadata

Release files for argsrun 0.0.2

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

Source distribution (sdist)

Source distribution for argsrun 0.0.2
File Size Uploaded Provenance Actions
argsrun-0.0.2.tar.gz 4.0 kB Without provenance Details for argsrun-0.0.2.tar.gz

Built distribution (wheel)

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

Total release size: 9.2 kB

Release files / argsrun-0.0.2.tar.gz

Download URL argsrun-0.0.2.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
1d29a762860d4d3b73e6fe01f65a8f776f7fd00f5ec25374401b2cab584146d9
BLAKE2b-256 checksum
How to use checksums
a9a1e9d318c2ae024f76712b73498937df0efe9a91536a1e87d2f56439ce4d1f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / argsrun-0.0.2-py3-none-any.whl

Download URL argsrun-0.0.2-py3-none-any.whl
Size 5.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
844fbc8e5ccdeea0fc59e30beb8e22d2900d930315cb16b1a25de967c2fb3999
BLAKE2b-256 checksum
How to use checksums
96a9c3351069e25c8e0fc98dd0d94b872b76872c356fe3658d33a21e685d7954
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for argsrun 0.0.2

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.2 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