Skip to main content

A Python Application Development Framework

Project description

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 main function
  • 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

appframe-0.0.1.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

appframe-0.0.1-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file appframe-0.0.1.tar.gz.

File metadata

  • Download URL: appframe-0.0.1.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for appframe-0.0.1.tar.gz
Algorithm Hash digest
SHA256 9091886fb88db83aaf6e3b779b33331d57225091d82f6db548621e7b92f1bd1c
MD5 cb56c8bef32ac878cbc017955fc1f168
BLAKE2b-256 e9a5f7fedb776c9b84498596e84be1f0a29bbe6f0255827a138521c510068cef

See more details on using hashes here.

File details

Details for the file appframe-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: appframe-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 6.6 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for appframe-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 086b89c274785fa98d935f5ef8b377a34798301261a1a1783978befd3b771fd6
MD5 6e9032dde660c9bf6f2503edf3f0f2d6
BLAKE2b-256 90c01e3a46460d24293030ab39ed98829783b7fba7d5a2241a06f1732fd72aeb

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page