Installation - InjectQ Documentation
Author: InjectQ Contributors
Description: Modern Python dependency injection library

Skip to content

# Installation

This guide helps you install InjectQ and verify a minimal setup.

## Basic installation

    pip install injectq

## Optional integrations (install only what you need)

- FastAPI integration: `pip install injectq[fastapi]`
- FastMCP integration: `pip install injectq[fastmcp]`
- Taskiq integration: `pip install injectq[taskiq]`
- Developer extras (mypy, pytest, black, ...): `pip install injectq[dev]`

Example combined install:

    pip install "injectq[fastapi,fastmcp,taskiq]"

## Supported Python versions

InjectQ supports Python 3.10 and above. Using 3.11+ is recommended for best runtime performance.

## Quick verification

After installation, verify the library behaves as expected. Use `InjectQ.get_instance()` (recommended):

    from injectq import InjectQ

    container = InjectQ.get_instance()
    print(f"InjectQ available: {container is not None}")

    class A:
        pass

    # Bind a simple instance
    container[A] = A()

    assert container[A] is not None
    assert container.get(A) is container[A]
    assert container.try_get(A, None) is container[A]

    print("InjectQ appears to be working")

## Development installation

To work on the repository locally:

    git clone https://github.com/Iamsdt/injectq.git
    cd injectq
    pip install -e .[dev]

## Next steps

Now explore the Quick Start to get started with InjectQ!

````