{"library":"pykka","title":"Pykka","description":"Pykka is a Python implementation of the actor model, providing concurrency primitives for building distributed and concurrent systems. Version 4.4.2 runs on Python >=3.10. New releases are sporadic.","language":"python","status":"active","last_verified":"Fri May 01","install":{"commands":["pip install pykka"],"cli":null},"imports":["from pykka import Actor","from pykka import ThreadingActor","from pykka import ActorRef","from pykka import ActorRegistry","from pykka import getattr"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import pykka\n\nclass Greeter(pykka.ThreadingActor):\n    def __init__(self, greeting='Hi'):\n        super().__init__()\n        self.greeting = greeting\n\n    def on_receive(self, message):\n        return f'{self.greeting}, {message}'\n\nactor = Greeter.start(greeting='Hello').proxy()\nprint(actor.on_receive('World').get())  # Hello, World\nactor.stop()","lang":"python","description":"Define an actor class, start it, send a message, and stop.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}