Opyoid

Latest version: v3.0.1

Safety actively analyzes 722491 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 6

3.0.1

Fixes
- Fix NoBindingFound error being raised when using multi bindings and injecting pep585 style list arguments

3.0.0

Breaking changes
- Remove support for Python 3.8

2.0.2

Fixes
- Fixed an InjectException raised when trying to bind a class with a stringified parameter type

2.0.1

Fixes
- Fixed MultiBindings not using the correct provider when having multiple ItemBindings to Providers

2.0.0

Breaking changes
- Remove support for Python < 3.8
- MultiBindings now have the parameter `override_bindings` set to `False` by default (was `True`)

1.7.0

Features
- Add official support for Python 3.11
- Opyoid is now PEP561 compliant, and as such compatible with mypy
- Added a Context Scope that can be used to control more precisely the scope of created objects:
python
from opyoid import ContextScope, Injector, SelfBinding

class MyClass:
pass


injector = Injector(bindings=[SelfBinding(MyClass, scope=ContextScope)])
scope = injector.inject(ContextScope)

with scope:
instance_1 = injector.inject(MyClass)
instance_2 = injector.inject(MyClass)

with scope:
instance_3 = injector.inject(MyClass)

assert instance_1 is instance_2
assert instance_1 is not instance_3

Page 1 of 6

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.