This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

pykka-injector is a module uniting Injector (Dependency Injection framework) and Pykka (Python implementation of the actor model). It’s only purpose is to allow you to inject dependencies into Pykka Actors.

Works with:

  • CPython 2.x >= 2.6, 3.x >= 3.2
  • PyPy >= 1.9

Platform independent.

Usage example

from injector import inject, Injector, InstanceProvider, Key, singleton
from pykka import ThreadingActor
from pykka_injector import ActorStarter

Config = Key('Config')

class MyActor(ThreadingActor):
    @inject(config=Config)
    def __init__(self, config, user):
        self.config = config
        self.user = user

def configure(binder):
    binder.bind(
        Config,
        to=InstanceProvider(dict(environment='dev')),
        scope=singleton,
    )

if __name__ == '__main__':
    injector = Injector(configure)
    starter = injector.get(ActorStarter)
    actor_ref = starter.start(MyActor, kwargs=dict(user='root'))

    actor_proxy = actor_ref.proxy()
    print(actor_proxy.config.get(), actor_proxy.user.get())

    actor_ref.stop()
Release History

Release History

0.1.1

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
pykka-injector-0.1.1.tar.gz (2.6 kB) Copy SHA256 Checksum SHA256 Source Aug 28, 2013

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting