Note the argc.get key is the string but only if the argument started with an "-"
if it started with "--" then you can use it by added and "-" in front of the string
```py
argc().get("s") # - short
argc().get("-long") # -- long
```
## Changelog
2.1.0 - single file version
2.0.2 - Bugfixes
2.0.1 - Fixed detectType for python2
2.0.0 - Added tests working way better now
1.1.3 - stupid dots
1.1.2 - removed / in as an arguement
1.1.1 - Some more bugfixes!
1.1.0 - Thought so. and python2 support
1.0.2 - Confusion
1.0.1 - Bugfix
1.0.0 - Release
### Example 1
```py
from argc import argc
if __name__ import "__main__":
# for python 2 do as it does not support charectar conversion
# args = argc(sys.argv, False)
args = argc() # uses sys.argv by default
args.add("version", 10.0, True) # the true means that it will exit when the command is done
args.add("func", lambda: 100**10, True) # real time calculations and running of functions
args.add("func_2", functionname) # or just a function
args.add("help", [
"It also supports lists for multi-line prints",
"With support for {}".format("functions"),
lambda: 10-9**10,
"So yeah... Awsome"
], True)
args.run() # checks and runs arguments (can stop program)
args.get("-config_name", True) # get config if by default it will return Value but
# add True it will return True/False
```
### Example 2
```py
# example program that takes some arguments
# run as ${python} test.py ${args}
import random
from argc import argc
__version__ = "1.0.0"
__author__ = "Monty python"
__package__ = "STRING RING"
__help__ = [
"Usage: ",
" import STRING_RING as sr",
" tone = 10",
" sr.RING(tone)",
"Author: {}".format(__author__),
"Name: %(__package__)s"
]
# arguments are case sensetive but the -- and - is stripped
# so you only need the names. but that also means that -hallo, --hallo and /hallo
# all triggers the hello command
# option
if __name__ == "__main__":
args = argc() # uses sys.argv by default
args.add("help", __help__, True) # exits on help
args.add("version", __version__, True)
# supports functions (prints return value)
args.add("func", lambda: random.randint(0, 10**10), True)
# checks and runs commands
args.run()
# code after .run
# Use .get for config
if args.get("useL"):
print("Using L")
else:
print("am not using L")
# and for custom config using long
print(args.get("-config", False)) # Use raw data returns None if it does not exist
```
Metadata
Release files for argc 2.1.0
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 | Actions |
|---|---|---|---|---|
| argc-2.1.0.tar.gz | 4.2 kB | Without provenance | Details for argc-2.1.0.tar.gz |
Release files / argc-2.1.0.tar.gz
| Download URL | argc-2.1.0.tar.gz |
|---|---|
| Size | 4.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2e442d1420c016d25aab97217f87a2c4a5564c9f8fcf254dddb3d40f778e8d1d
|
|
BLAKE2b-256 checksum How to use checksums |
1cd7fc8550b3089ae8369b50e4c3d9ee3c6a13e0e4f06f60f390f83468edbd8d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for argc 2.1.0
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.