fastcommand
Python module for defining multi-command cli programs
Description
The fastcommand module is a lightweight wrapper over argparse which aims to make it easier to write multi-command cli programs and utilities. It does so by providing convenience decorators that allow for quickly defining sub-commands.
Usage
Example
import fastcommand
@fastcommand.command("hello", help="say hello")
def command_hello(options):
print("Hello, World!")
@fastcommand.command("goodbye", help="say goodbye", arguments=[
fastcommand.Argument("name"),
fastcommand.Argument("--wave", "-w", action="store_true", default=False)
])
def command_goodbye(options):
print(f"Goodbye, {options.name}!")
if options.wave:
print("👋")
def main():
cli = fastcommand.CommandParser(description="Simple fastcommand example.")
cli.use_logging(format="[%(levelname)s] %(message)s")
cli.run()
if __name__ == "__main__":
main()
Autocomplete
fastcommand provides autocomplete using argcomplete. Enable it by adding the following the argcomplete marker to the to of your application:
# PYTHON_ARGCOMPLETE_OK
Install argcomplete locally to be able to use autocomplete:
pip install argcomplete
And then either:
-
activate globally by running:
activate-global-python-argcomplete
-
activate it for a specific command by running:
eval "$(register-python-argcomplete my-python-app)"
See the argcomplete documentation for more details.
Metadata
Release files for fastcommand 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| fastcommand-0.2.1.tar.gz | 3.7 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| fastcommand-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.4 kB
Release files / fastcommand-0.2.1.tar.gz
| Download URL | fastcommand-0.2.1.tar.gz |
|---|---|
| Size | 3.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a6060b5b0a3914cf8ab9a2e2f60ca82610d9a29254cc608ddd11093308c05ac8
|
|
BLAKE2b-256 checksum How to use checksums |
199bc63eeb636d5793a34f5090af30a8d47db9322b724d915f5aeaac932a72a2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Aug 6, 2026.
Transparency logRelease files / fastcommand-0.2.1-py3-none-any.whl
| Download URL | fastcommand-0.2.1-py3-none-any.whl |
|---|---|
| Size | 5.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3083c989d6121b351a09fe50e5942477165b8cc4883ac9f8506099c3a96a3f9b
|
|
BLAKE2b-256 checksum How to use checksums |
bec07f2b7559e04e22d88eb6566ca42691016f4f240dd9f36b80a5f30a294993
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Aug 6, 2026.
Transparency logSecurity for fastcommand 0.2.1
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
All 2 files in this release have been uploaded with provenance metadata.
Attestation for fastcommand-0.2.1.tar.gz
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 Aug 6, 2026.
Transparency logA 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.