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.1.1.tar.gz
(9.5 kB
view details)
Built Distribution
File details
Details for the file nr.appfire-0.1.1.tar.gz
.
File metadata
- Download URL: nr.appfire-0.1.1.tar.gz
- Upload date:
- Size: 9.5 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.61.2 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6dfbbdc0c0d2333dc5312b4ff00b77ddbd2b799ac3d4928d97c7fe03f75eb620 |
|
MD5 | 8ea259a2a5c08a67202e39215cce9621 |
|
BLAKE2b-256 | f38529205aad39fafd85697f2c97ceeff8a2399fd72a1bf380f2f8a7ca229633 |
File details
Details for the file nr.appfire-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: nr.appfire-0.1.1-py3-none-any.whl
- Upload date:
- Size: 9.6 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.61.2 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 819e6723be563fc72b923bcc50d2c04941de594aaeb6af17268069ad4b0c96f7 |
|
MD5 | efe11074ded3a8d6c22e47e6afd9a8a9 |
|
BLAKE2b-256 | 62c5ff7bf7ff56106c319a9f6f0e3feb5554b484e5fcd12fa26f3c01b3e52bf8 |