Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (7.8%) to scientific vocabulary
Last synced: 11 months ago
·
JSON representation
Repository
Simpler command line argument parsing in Python
Basic Info
- Host: GitHub
- Owner: chbrown
- License: mit
- Language: Python
- Default Branch: master
- Size: 137 KB
Statistics
- Stars: 5
- Watchers: 0
- Forks: 1
- Open Issues: 0
- Releases: 0
Created over 12 years ago
· Last pushed over 3 years ago
Metadata Files
Readme
License
README.md
Simpler command line argument parsing
In the spirit of optimist: less magic, more flexibility.
pi install argv
Quickstart
Manual specification of arguments, no configuration:
import argv
argv.parse(['-i', 'input.txt', '-z', '--verbose'])
>>> {'i': 'input.txt', 'verbose': True, 'z': True}
Uses sys.argv (without the executable name) if no argument list is given:
import sys
sys.argv
>>> ['/usr/local/bin/bottler', 'exec', 'prog.py', '--debug']
argv.parse()
>>> {'_': ['exec', 'prog.py'], 'debug': True}
Configuration:
parser = argv.Parser()
parser.add('action')
parser.add('target')
parser.add('-d', '--debug')
parser.parse(['exec', 'prog.py', '--debug'])
>>> {'action': 'exec', 'd': True, 'debug': True, 'target': 'prog.py'}
Testing
Continuous integration:
Or run tests locally:
python setup.py test
Development
Terminology:
- flag: a command line argument marked with a double dash or each component of a group denoted by a single dash. E.g.,
--verbose --logfile logs/app.txthas two flags:verboseandlogfile.-czf archive.tgz app/has three flags:c,z, andf.
- token: a white-space (or
=) separated command line item. E.g.,--input=prog.py --logfile logs/app.txthas four tokens:--input,prog.py,--logfile, andlogs/app.txt
Related libraries
- https://github.com/docopt/docopt
- http://docs.python.org/2/library/argparse.html
- http://docs.python.org/2/library/optparse.html (Deprecated)
- http://tclap.sourceforge.net/manual.html
TODO: write about differences between this library (argv) and these libraries,
relative merits of each, opposing philosophies, etc.
License
Copyright (c) 2013 Christopher Brown. MIT Licensed.
Owner
- Name: Christopher Brown
- Login: chbrown
- Kind: user
- Location: New York, NY
- Website: https://henrian.com
- Repositories: 345
- Profile: https://github.com/chbrown
GitHub Events
Total
Last Year
Committers
Last synced: over 1 year ago
Top Committers
| Name | Commits | |
|---|---|---|
| Christopher Brown | io@h****m | 7 |
Committer Domains (Top 20 + Academic)
henrian.com: 1
Issues and Pull Requests
Last synced: 11 months ago
All Time
- Total issues: 1
- Total pull requests: 1
- Average time to close issues: 5 days
- Average time to close pull requests: 12 days
- Total issue authors: 1
- Total pull request authors: 1
- Average comments per issue: 1.0
- Average comments per pull request: 0.0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- zuber-bioinfo (1)
Pull Request Authors
- emresvd (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 106 last-month
- Total dependent packages: 0
- Total dependent repositories: 3
- Total versions: 1
- Total maintainers: 1
pypi.org: argv
Simpler command line argument parsing
- Homepage: https://github.com/chbrown/argv
- Documentation: https://argv.readthedocs.io/
- License: Copyright (c) 2013 Christopher Brown Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
Latest release: 0.0.3
published over 12 years ago
Rankings
Dependent repos count: 9.0%
Dependent packages count: 10.0%
Downloads: 13.4%
Average: 15.3%
Stargazers count: 21.5%
Forks count: 22.6%
Maintainers (1)
Last synced:
11 months ago
Dependencies
setup.py
pypi
