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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

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