Skip to main content

No project description provided

Project description

Another simple ioc framework for python.

Usage

from anyioc import ServiceProvider
provider = ServiceProvider()
provider.register_singleton('the key', lambda x: 102) # x will be scoped ServiceProvider
value = provider.get('the key')
assert value == 102

Need global ServiceProvider ? try from anyioc.g import ioc.

There are some predefined key you can use direct, but you still can overwrite it:

  • ioc - get current scoped ServiceProvider instance.

  • provider - alias of ioc

  • service_provider - alias of ioc

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

anyioc-0.3.2.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

anyioc-0.3.2-py3.7.egg (6.5 kB view details)

Uploaded Source

File details

Details for the file anyioc-0.3.2.tar.gz.

File metadata

  • Download URL: anyioc-0.3.2.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/3.7

File hashes

Hashes for anyioc-0.3.2.tar.gz
Algorithm Hash digest
SHA256 e50e1c1d0d8dfb81c24667a44585a3152db872d39f7c0e25dd99a00704141791
MD5 002e52080a349f58ee8bdad4aca37b1d
BLAKE2b-256 260a659b634099f7152137d86fcad4496524a0557b2a4c217036f74c42823993

See more details on using hashes here.

File details

Details for the file anyioc-0.3.2-py3.7.egg.

File metadata

  • Download URL: anyioc-0.3.2-py3.7.egg
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/3.7

File hashes

Hashes for anyioc-0.3.2-py3.7.egg
Algorithm Hash digest
SHA256 89b0a5ac4fcfe8c7d3194804be935f47b454fdc087684fd771c42bc8a61ad4a9
MD5 663cd9b5397b5dad0f6663cdcb133e11
BLAKE2b-256 82d2f4b457a19abd0dd4e94541980e921d8878f2e5455dcee9ecc543877787f5

See more details on using hashes here.

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