Skip to main content

Library for simple and fast design pattern that extends model, view and controller for asynchronous events in supported modern programming languages.

Project description

Thoaded

Library for simple and fast design pattern that extends model, view and controller for asynchronous events in supported modern programming languages.

Installation

Use pip to install these utilities:

pip install thoaded

Documentation

Thoaded applications are created by composing a series of simple inheritances. By convention, this components extends Modify-based Asynchronous Pattern.

from thoaded import Modeled, Viewed, Controlled
import asyncio

class SampleMoldeled(Modeled):

    async def added(self, value):
        return value

    async def updated(self, value):
        return value

    async def deleted(self, value):
        return value

    async def readed(self, value):
        return value

    async def queried(self, value=None):
        return value

    async def listened(self, value=None):
        return value

    async def unlistened(self, value=None):
        return value

class SampleViewed(Viewed):

    async def added(self, value):
        return value

    async def updated(self, value):
        return value

    async def deleted(self, value):
        return value

    async def readed(self, value):
        return value

    async def queried(self, value=None):
        return value

    async def listened(self, value=None):
        return value

    async def unlistened(self, value=None):
        return value

class SampleControlled(Controlled):

    def __init__(self):
        super().__init__(SampleMoldeled(), SampleViewed())
        text = asyncio.run(self.modeled.readed("Hello, World!"))
        text = asyncio.run(self.viewed.readed(text))
        print("Print " + text + " successfully.")

Compatibility

Thoaded supports all environments that are Python 3.

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

thoaded-0.1.0.tar.gz (2.4 kB view details)

Uploaded Source

Built Distribution

thoaded-0.1.0-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file thoaded-0.1.0.tar.gz.

File metadata

  • Download URL: thoaded-0.1.0.tar.gz
  • Upload date:
  • Size: 2.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.6.9

File hashes

Hashes for thoaded-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a23673d6d312d23410fb05751ae75a3c0749f3991ed42c55462c9096275d067b
MD5 905a0e8afa1aa6f0c29173f702df5989
BLAKE2b-256 e6f5906562ef19661af910a3ed8b4d77d6fddeb571dd6ae2dc4e713b185b9e56

See more details on using hashes here.

File details

Details for the file thoaded-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: thoaded-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.6.9

File hashes

Hashes for thoaded-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f7a51242c5e059e90ba756a8719d1ff90a8b914d733a6f7275bd4baa9feb74b2
MD5 b0e79bcf9891c34658347719ca2fe468
BLAKE2b-256 1b0058001a20c34480d512970461a2d6a86a18177d6eb2b530bc717b7292f9c1

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