slack
a DI container
What it is and what it does
Slack is a lightweight dependency injection container that manages object lifecycle and dependency resolution. It registers components (classes or factory functions) by name and provides singleton instances on demand, automatically resolving declared dependencies from the container. It also supports partial injection to bind some dependencies while leaving others for later, decorator-based registration, and grouped lifecycle management with reset capabilities.
The package is designed for straightforward DI patterns in Python applications where you need centralized component registration and retrieval. However, it has been abandoned since 2014 and targets only Python 2.7 and 3.4, making it unsuitable for modern Python projects without significant verification of compatibility.
Use it for:
- Building small applications that need centralized dependency management without a full framework
- Registering and retrieving singleton services in a monolithic application
- Partial application of functions by pre-binding some dependencies while leaving others open
- Organizing component lifecycle with grouped resets for test isolation or state management
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A dependency injection container that registers and provides singleton instances, with support for partial injection, decorator-based registration, and grouped lifecycle management.
No. The package is abandoned (last commit 2014-05-27) and targets only Python 2.7 and 3.4, both unsupported. High install friction and no runtime dependencies suggest potential packaging issues. Modern alternatives with active maintenance exist for dependency injection in Python. Only consider if you are maintaining legacy Python 2.7 code and have verified compatibility.
Install
slack on PyPI
pip
pip install slackuv
uv add slackpoetry
poetry add slackInstalling slack
Before you install
High install friction with no runtime dependencies. The package is abandoned—last commit was 2014-05-27, over a decade ago—and classified as Pre-Alpha. It targets Python 2.7 and 3.4, both long out of support.
License in practice
MIT license is permissive and imposes no restrictions on use, modification, or distribution.
Quickstart
from slack import Container
c = Container()
c.register('component', MyClass)
instance = c.provide('component')
Package targets Python 2.7 and 3.4 only; compatibility with modern Python versions is unverified.
Verify before relying
- Whether the package actually works on modern Python versions despite targeting only 2.7 and 3.4
- Whether the high install friction is due to a missing wheel or other packaging issue
- Real-world usage patterns and whether the singleton-by-default behavior matches modern DI expectations
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | high — source build required |
| Runtime dependencies | none |
| Maintenance | abandoned — 4,524 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 153,577/month — #10,876 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Keywords: DI, Container
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
dependency-injectorDependency Injector is a dependency injection…
permissive · top 5,000 on PyPI
dishkadishka is an IoC container that manages…
permissive · top 15,000 on PyPI
punqPunq is a dependency injection container for…
unclear · top 15,000 on PyPI
injectorInjector is a Python dependency injection…
permissive · top 5,000 on PyPI
kinkKink is a lightweight dependency injection…
permissive · top 15,000 on PyPI
simple-diA strictly typed dependency injection library…
permissive · top 15,000 on PyPI
wireupWireup is a type-driven dependency injection…
permissive · top 15,000 on PyPI
rodiRodi is a dependency injection container for…
permissive · top 15,000 on PyPI
pinjectPinject is a dependency injection library that…
permissive · top 15,000 on PyPI
picoboxPicobox is a lightweight dependency injection…
permissive · top 15,000 on PyPI