Skip to main content

Appfire is a toolkit that provides utilities for quickly building configurable microservices.

Project description

nr.appfire

Appfire is a toolkit that provides utilities for quickly building configurable microservices.

Components

nr.appfire.tasks

This package provides an easy-to-use framework for managing background tasks in a Python application.

Example

import dataclasses
from nr.appfire.tasks import Runnable, Task, DefaultExecutor

@dataclasses.dataclass
class Looper(Runnable[None]):
  loops: int

  def run(self, task: Task[None]) -> None:
    for i in range(self.loops):
      print(i)
      if not task.sleep(1):
        print('Bye, bye')
        break

executor = DefaultExecutor('MyApp')
executor.execute(Looper(10))
executor.idlejoin()

Copyright © 2021 Niklas Rosenstein

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

nr.appfire-0.2.1.tar.gz (10.6 kB view details)

Uploaded Source

Built Distribution

nr.appfire-0.2.1-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

Details for the file nr.appfire-0.2.1.tar.gz.

File metadata

  • Download URL: nr.appfire-0.2.1.tar.gz
  • Upload date:
  • Size: 10.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.8.10

File hashes

Hashes for nr.appfire-0.2.1.tar.gz
Algorithm Hash digest
SHA256 0d631254a6da7f8c5cd2f81b6300e40fb2407acfbcb3dbe2c2608a99d61edf3c
MD5 f36671da07816a2acb7727663305f580
BLAKE2b-256 6de07631768557d63921ee53d7b725d7602b12fb22ca91fe743f3fc55d5072ed

See more details on using hashes here.

File details

Details for the file nr.appfire-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: nr.appfire-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 11.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.8.10

File hashes

Hashes for nr.appfire-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a97c84f3bae85ebf1b86c85787a85f0436cb905815199cfc5a6f6c52fe7819f2
MD5 c86a494b3d99859eadde3db255ae15ff
BLAKE2b-256 ae1da78c1428aa1cd2504b1eb191ac971e2ef2932d91566ddb818b6d443e6cd4

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