Introduction and Installation
Appframe is an open source python library that reduces the code and complexity of developing command line applications. It handles most of the low level logic while enforcing a modular architecture.
Features
- 2 lines of code for the
mainfunction - Composition of the CLI commands from a commands/ directory
Appframe leverages the follwing greate libraries:
Installation
Appframe is avaiable from the official Python Package Index (PIP), you can install it from the terminal:
pip install appframe
Hello World
main.py
import appframe
appframe.main(__name__, __file__, "test-app", "0.1")
commands/hello.py
from appframe import Command, verbose
class CreateCommand(Command):
"""
Greet a person
greet
{person? : name of the person to greet}
"""
def handle(self):
person = self.argument("person") or "Peter"
verbose(1, "Greeting person")
print(f"Hello {person}")
Test the app:
python test.py greet Joe
Metadata
Release files for appframe 0.0.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 | |
|---|---|---|---|
| appframe-0.0.1.tar.gz | 10.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| appframe-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.8 kB
Release files / appframe-0.0.1.tar.gz
| Download URL | appframe-0.0.1.tar.gz |
|---|---|
| Size | 10.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9091886fb88db83aaf6e3b779b33331d57225091d82f6db548621e7b92f1bd1c
|
|
BLAKE2b-256 checksum How to use checksums |
e9a5f7fedb776c9b84498596e84be1f0a29bbe6f0255827a138521c510068cef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.8.6
|
Release files / appframe-0.0.1-py3-none-any.whl
| Download URL | appframe-0.0.1-py3-none-any.whl |
|---|---|
| Size | 6.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
086b89c274785fa98d935f5ef8b377a34798301261a1a1783978befd3b771fd6
|
|
BLAKE2b-256 checksum How to use checksums |
90c01e3a46460d24293030ab39ed98829783b7fba7d5a2241a06f1732fd72aeb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.8.6
|