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.0.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

anyioc-0.3.0-py3.7.egg (5.3 kB view details)

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for anyioc-0.3.0.tar.gz
Algorithm Hash digest
SHA256 e9d03024fe59b667eb4762fa8011f4560667ac81b3ae3124e270bfb5ac4bbb6a
MD5 27a7f23d3727bd6c6e8fdedb8ceb55bf
BLAKE2b-256 04e2de5a2a2eef85e0909db725b64d0ae43cba04fb2d8e0992d9ab1944bedd60

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for anyioc-0.3.0-py3.7.egg
Algorithm Hash digest
SHA256 1b68274a3b05793f8cce75dedcdee1128b381391f71589bce47119c0d5690ad7
MD5 05fa3c14c60c6982ef569bae75732a76
BLAKE2b-256 961c76466652e35d92a5def0e2f4d9e7940e1035be56fc77185c5d69be46248f

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