pytcm
A Python Terminal Commands Manager
Installation
$ pip install pytcm
Usage
Using execute directly
import pytcm
binary = 'python'
opts = [
pytcm.Flag('--version', True)
]
result = pytcm.execute(binary, opts)
print(result.out) # "Python 3.9.7"
print(result.err) # ""
print(result.returncode) # 0
Using a Command object that holds the context
import pytcm
binary = 'python'
opts = [
pytcm.Flag('--version', True)
]
cmd = pytcm.Command(binary, opts)
cmd.execute()
print(cmd.out) # "Python 3.9.7"
print(cmd.err) # ""
print(cmd.returncode) # 0
Options
Flag
A boolean option
import pytcm
flag = pytcm.Flag("--verbose", True)
opt = flag.parse()
print(opt) # "--verbose"
Explicit
An option with an equal sign
import pytcm
explicit = pytcm.Explicit("--age", 12)
opt = explicit.parse()
print(opt) # "--age=12"
Implicit
An option separated by a space character
import pytcm
implicit = pytcm.Implicit("--age", 12)
opt = implicit.parse()
print(opt) # "--age 12"
Positional
A simple inline option
import pytcm
positional = pytcm.Positional("test.txt")
opt = positional.parse()
print(opt) # "test.txt"
Contributing
Thank you for considering making pytcm better.
Please refer to docs.
Change Log
See CHANGELOG
License
MIT
Metadata
Release files for pytcm 0.5.6
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 |
|---|---|---|---|---|
| pytcm-0.5.6.tar.gz | 4.0 kB | Without provenance | Details for pytcm-0.5.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pytcm-0.5.6-py3-none-any.whl | Python 3 | none | any | Details for pytcm-0.5.6-py3-none-any.whl |
Total release size: 9.2 kB
Release files / pytcm-0.5.6.tar.gz
| Download URL | pytcm-0.5.6.tar.gz |
|---|---|
| Size | 4.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1debb06c3e4eb80acb84f9c3f72b292045d63212faf9cca458de600d9b7c7b46
|
|
BLAKE2b-256 checksum How to use checksums |
ab14d7c66af0d37f08f30b602b1982759aecc26e29fc496ab9e5be46ef8a9296
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.3 readme-renderer/35.0 requests/2.28.0 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.64.0 importlib-metadata/4.12.0 keyring/23.6.0 rfc3986/2.0.0 colorama/0.4.5 CPython/3.8.13
|
Release files / pytcm-0.5.6-py3-none-any.whl
| Download URL | pytcm-0.5.6-py3-none-any.whl |
|---|---|
| Size | 5.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c628c68c4de272829f57a8258f633e371086e1e057e22145c4f975692980c7ba
|
|
BLAKE2b-256 checksum How to use checksums |
df9a4b25b013f04614732284af8a730bbae55aac798c3241dd8664042dbb12e0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.3 readme-renderer/35.0 requests/2.28.0 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.64.0 importlib-metadata/4.12.0 keyring/23.6.0 rfc3986/2.0.0 colorama/0.4.5 CPython/3.8.13
|
Security for pytcm 0.5.6
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.