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
from dataclasses import dataclass
from nr.appfire.tasks import Task, TaskManager
@dataclass
class MyTask(Task):
loops: int
def __post_init__(self) -> None:
super().__init__(f'MyTask[loops={self.loops}]')
def run(self) -> None:
for i in range(self.loops):
if self.cancelled():
return
print(i)
self.sleep(1)
manager = TaskManager('MyApp')
manager.queue(MyTask(10))
manager.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.0.tar.gz
(10.7 kB
view details)
Built Distribution
File details
Details for the file nr.appfire-0.2.0.tar.gz
.
File metadata
- Download URL: nr.appfire-0.2.0.tar.gz
- Upload date:
- Size: 10.7 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | dcadce62d6da082828be3284cfa2bc88ea9b2fc601d13acf220bc1a24fec063a |
|
MD5 | 55be8241808c57e111691692390e85a0 |
|
BLAKE2b-256 | 62ef89d68f19d6582436d215ae74fc049460570af3971557282cc0a7766db426 |
File details
Details for the file nr.appfire-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: nr.appfire-0.2.0-py3-none-any.whl
- Upload date:
- Size: 11.2 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7fc8f39d7fce1594c9d5e120e271d9621748f87278a0aab0ff066564b588c5e5 |
|
MD5 | be5594d71996bbbad2416adbbdb1fd60 |
|
BLAKE2b-256 | 4f13366a57f411226f9e938d51a516d08296ec1812bc60448eb76392f0cc2e7a |