Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
.. image:: https://github.com/elfjes/gimme-that/actions/workflows/main.yml/badge.svg?branch=master :target: https://github.com/elfjes/gimme-that/actions/workflows/main.yml :alt: Github Actions
.. image:: https://badge.fury.io/py/gimme-that.svg :target: https://pypi.org/project/gimme-that :alt: PyPI - Package version
.. image:: https://img.shields.io/pypi/pyversions/gimme-that :target: https://pypi.org/project/gimme-that :alt: PyPI - Python Version
.. image:: https://codecov.io/gh/elfjes/gimme-that/branch/master/graph/badge.svg :target: https://codecov.io/gh/elfjes/gimme-that
.. image:: https://readthedocs.org/projects/gimme-that/badge/?version=latest :target: https://gimme-that.readthedocs.io/en/latest/ :alt: Read the Docs
A lightweight, simple but extensible dependency injection framework. Read the full documentation
here <https://gimme-that.readthedocs.io>
_
Install from PyPI <https://pypi.org/project/gimme-that>
_
.. code-block::
pip install gimme-that
Basic usage #############
.. code-block:: python
import gimme
class MyService:
pass
class ServiceConsumer:
def __init__(self, service: MyService):
self.service = service
# gimme.that automatically detects and resolves dependencies based on type annotations
consumer = gimme.that(ServiceConsumer)
isinstance(consumer.service, MyService) # True
Automatically detects dependencies based on type annotations
Works with dataclass
classes and attr.s
Class repository that stores created objects for re-use
Register classes to provide additional configuration on how gimme.that
should instantiate classes
Scoped repositories to manage the lifetime of created objects (useful for testing)
Does not require any decorators or other additions to your classes (most of the time). They remain your
classes
Detects circular dependencies, and provides the means to resolve them
Extensibility using plugins: create your own logic for resolving dependencies and instantiating classes
.. code-block::
pip install -e .[dev]
FAQs
Simple and flexible dependency injection framework.
We found that gimme-that demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.