easy-terminal
A library that help you to convert function into terminal command
Getting started
Installation
pip install easy-terminal
Require easy-events>=2.2.0
GitHub : Github
Usages
Add the @terminal() before the function you want to try in the terminal Use @main() to redirect any input to the function linked
Code example
from easy_terminal import terminal
help_msg = """
pc processor ram : will print the informations of the pc
hello : will print world
help : will show this message
"""
@terminal(aliases=["help"])
def h():
print(help_msg)
class A:
nb = 1
def __init__(self, nb=5):
self.nb = nb
@terminal()
def hello(self):
print("world", self.nb, "\n")
a = A(6)
@terminal()
async def hello():
print("world\n")
@terminal()
def pc(processor: str = "intel", ram: str = "8go"):
print(f"processor: {processor}\nram : {ram}\n")
@main()
def principal(car: str = "mercedes"):
print(f"Your car is a {car}")
"""
>hello
world
>A.hello
world 1
>a.hello
world 6
>pc
processor: intel
ram : 8go
>pc amd
processor: amd
ram : 8go
>pc amd 16go
processor: amd
ram : 16go
>help
pc processor ram : will print the informations of the pc
hello : will print world
help : will show this message
>peugot
Your car is a peugot
"""
This lib make you run python function in a terminal
Metadata
Release files for easy-terminal 0.8.1
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 |
|---|---|---|---|---|
| easy-terminal-0.8.1.tar.gz | 4.4 kB | Without provenance | Details for easy-terminal-0.8.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| easy_terminal-0.8.1-py3-none-any.whl | Python 3 | none | any | Details for easy_terminal-0.8.1-py3-none-any.whl |
Total release size: 9.0 kB
Release files / easy-terminal-0.8.1.tar.gz
| Download URL | easy-terminal-0.8.1.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bbc75a6d857bc9ba5fd9eb49fbeb4697d65c29367a0ce4f2bf0b4243d68e9638
|
|
BLAKE2b-256 checksum How to use checksums |
0ea8866e4aa1f3ae450d9d84f7e5e0521533515991de69562917eb8ea528ff07
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.10
|
Release files / easy_terminal-0.8.1-py3-none-any.whl
| Download URL | easy_terminal-0.8.1-py3-none-any.whl |
|---|---|
| Size | 4.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
23a3559a59aabc0c2dc08468f31e4eaace051d4379b97d0c7198d7b33165b64a
|
|
BLAKE2b-256 checksum How to use checksums |
04a84f15309888b8e58f34f51a52864ad66f03d21b75135938bfcc6c618a0d4d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.10
|
Security for easy-terminal 0.8.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.