Skip to main content

My own very simple python service locator

Project description

It’s a simple service locator that I made for use.

Installation

pip install bbibbi

Usage

from bbibbi import container, Symbol

SERVICE_SYMBOL = Symbol("SomeService")

class Service:
    def ten(self) -> int:
        return 10

container.register(SERVICE_SYMBOL, Service())

service: Service = container.get(SERVICE_SYMBOL)
assert service.ten() == 10

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

bbibbi-0.1.4.tar.gz (2.9 kB view hashes)

Uploaded Source

Built Distribution

bbibbi-0.1.4-py3-none-any.whl (3.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page