Skip to main content

…

Example

"""Do somethings

Usage:
    example.py [-vfr] do (a|b)

Options:
    -v --verbose    Be verbose.
    -f --force      Force.
    -r --random     Huh?.
"""
from docopt import docopt
from docopt_cmd import cmd

def main():
    args = docopt(__doc__)
    #print(args)

    cmd.dispatch(args)

#explicitly specify spec and options to pass as arguments
@cmd('do a', force='--force')
def something(force):
    print('doing a')
    print(force)

#or use magic
@cmd
def do_b(random):
    print 'doing b'
    print random

if __name__ == '__main__':
    main()

Metadata

Release files for docopt-cmd 0.0.1

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

Source distribution (sdist)

Source distribution for docopt-cmd 0.0.1
File Size Uploaded Provenance Actions
docopt-cmd-0.0.1.tar.gz 2.2 kB Without provenance Details for docopt-cmd-0.0.1.tar.gz

Release files / docopt-cmd-0.0.1.tar.gz

Download URL docopt-cmd-0.0.1.tar.gz
Size 2.2 kB
Tags Source
SHA-256 checksum
How to use checksums
1b97cb8871d97269674481a19c1d71d9370379bc4982fc09fc3f730b3db9978a
BLAKE2b-256 checksum
How to use checksums
b1f049c1c13544c40aa2113e6b8f0037ed52f0f91f75579c8650dfc0c247e2ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for docopt-cmd 0.0.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.

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.1 This release

1 release file 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