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.3.0.tar.gz
(14.8 kB
view hashes)
Built Distribution
nr.appfire-0.3.0-py3-none-any.whl
(17.6 kB
view hashes)
Close
Hashes for nr.appfire-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f63307febe642433b5b0a7d4d6c51e12728458519c67797ca6c56f347c98777 |
|
MD5 | faa3ed745d310be15cd6c0064022a75b |
|
BLAKE2b-256 | b34b2e00713ae8007b3643d5c6012d2b68600f2f95e0e04d62689af885ccba50 |