Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/synodriver/landnet
actor for python
https://github.com/synodriver/landnet
Last synced: 11 days ago
JSON representation
actor for python
- Host: GitHub
- URL: https://github.com/synodriver/landnet
- Owner: synodriver
- Created: 2022-07-08T15:36:23.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-07-12T02:13:05.000Z (over 2 years ago)
- Last Synced: 2024-10-11T11:26:29.505Z (about 1 month ago)
- Language: Python
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.markdown
Awesome Lists containing this project
README
# landnet
- inspired by skynet, the actor style concurrency### public api
```python
from typing import Any, Dict, Optional, Union, Callable, Awaitable, TypeVar
T = TypeVar('T')
Handler_T = Union[Callable[..., Awaitable[T]], Callable[..., T]]class Service:
name: Any
kwargs: Any
def __init__(self, name, *, handler: Handler_T = ..., on_startup: Handler_T = ..., on_shutdown: Handler_T = ..., max_size: int = ..., **kwargs) -> None: ...
def handle(self): ...
def on_startup(self): ...
def on_shutdown(self): ...
def put_msg(self, msg) -> None: ...
async def startup(self) -> None: ...
async def shutdown(self) -> None: ...def get_service(name: str) -> Optional[Service]: ...
def list_services() -> Dict[str, Service]: ...
def send(name: Union[Service, str], *args, **kwargs) -> None: ...
async def call(name: Union[Service, str], *args, **kwargs): ...
def reply(uuid: int, msg: Any, err: Any = ...) -> None: ...
```