Skip to main content

Quack Quack: A simple application framework

Project description

Quack Quack

If it quacks like a quack, then it's a Quack Quack. Version: 1.0.2

Table of Contents

  1. Overview
  2. Quick Using Guide
  3. Installation
  4. Tutorial
  5. Plugins
  6. Phases
  7. More info
  8. Example

Overview

This project aims to resolve problem of configuring an application, which needs to have initialization step (for example: for gathering settings or establishing connections) and use Python style code (context managers and decorators) to get those data.

For example, normally you would need to use two separate mechanism for settings in celery application and web application, because you should not use web application startup process in the celery app. This package provide a solution for this problem, by giving one simple and independent of other frameworks mechanism to implement everywhere.

Quick Using Guide

To use Quack Quack you need to create the application class (inherited from qq.Application) in which you need to add plugins. After configuring, you need to "start" the application. After that you can use the configurator as context manager.

from qq import Application, Context
from qq.plugins import SettingsPlugin

class MyApplication(Application):
    def create_plugins(self):
        self.plugins["settings"] = SettingsPlugin('esett')

application = MyApplication()
application.start('application')

with Context(application) as ctx:
    print(ctx["settings"])

context.settings in above example is variable made by the SettingsPlugin. If you would like to know more, please go to the Tutorial

Installation

pip install quackquack

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

quackquack-1.0.3.tar.gz (23.4 kB view hashes)

Uploaded Source

Built Distribution

quackquack-1.0.3-py3-none-any.whl (37.4 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