Skip to main content

network-docopt

NetworkDocopt is a command line argument parser for networking focused applications. This was heavily inspired by the docopt module at http://docopt.org/ (no code from docopt was used however). The key differences are:

  • Support for partial command line options. If your program foo has a “foo show summary” option you can also enter “foo sh sum”

  • Support for integration into bash’s auto-complete mechanism

Example

  • See network-docopt-example for an example of how to use this module

  • For bash <tab> auto-completion and bash <tab><tab> “show me available options” you must create a small bash script in /usr/share/bash-completion/completions/ like so:

  • cp completions/network-docopt-example /usr/share/bash-completion/completions/

This bash script will call network-docopt-example with ‘options’ as the last argument. For instance if you type “network-docopt-example show ip “ the bash script will call “network-docopt-example show ip options” which will return “route” and “interface”. This tells bash what the next options are.

Contributing

  1. Fork it.

  2. Create your feature branch (git checkout -b my-new-feature).

  3. Commit your changes (git commit -am 'Add some feature').

  4. Push to the branch (git push origin my-new-feature).

  5. Create new Pull Request.

License and Authors

Original Author:: Daniel Walton

Copyright:: 2015 Cumulus Networks Inc.

Cumulus icon

Cumulus icon

Version History

  • 0.1.10: Bugfixes. Fix setup.py after adding gitversion support. one can build debs now

  • 0.1.9: Add gitversion support

  • 0.1.8: Initial commit to pypi

Cumulus Linux

Cumulus Linux is a software distribution that runs on top of industry standard networking hardware. It enables the latest Linux applications and automation tools on networking gear while delivering new levels of innovation and flexibility to the data center.

For further details please see: cumulusnetworks.com

This project is licensed under MIT

Metadata

Release files for network-docopt 0.1.10

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

Built distributions (wheels)

Table of built distributions (wheels) for network-docopt 0.1.10
File Interpreter ABI Platform
network_docopt-0.1.10-py3-none-any.whl Python 3 none any Details
network_docopt-0.1.10-py2-none-any.whl Python 2 none any Details

Total release size: 17.8 kB

Release files / network_docopt-0.1.10-py3-none-any.whl

Download URL network_docopt-0.1.10-py3-none-any.whl
Size 8.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
69774cc1e1697f55e86c2015f792731c1baeffdbc69da9e82ada027b53a49eba
BLAKE2b-256 checksum
How to use checksums
a13ee322a596350d28db7ef1c95960e218e707d7a0ce0ca4a5c4ac977d1e2753
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / network_docopt-0.1.10-py2-none-any.whl

Download URL network_docopt-0.1.10-py2-none-any.whl
Size 8.9 kB
Tags Python 2
SHA-256 checksum
How to use checksums
0044f423a06268eae0e7fdfff867c24888b04792587c777fafa2c21d6940cd5a
BLAKE2b-256 checksum
How to use checksums
3940bc03bb0b02578b9ac4bbda0951e0bcc89f454fffdfb9a4f43231f208ea2d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.10 This release

2 release files

0.1.9

0.1.7

1 release file

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