How to Use These Docs¶
Choose your path based on what you want to accomplish.
“I want to try dioxide quickly”¶
Time: 15 minutes
Get dioxide running with a minimal example to understand the core concepts.
Getting Started - Install and build your first container
Choosing Between @service and @adapter - Which decorator: @service or @adapter? (decision tree)
Tutorial 1: Basic Dependency Injection - See a complete working example
Tutorial 2: Email Service with Profiles - Understand profile switching
“I’m evaluating dioxide for my project”¶
Time: 30 minutes
Understand what dioxide offers and whether it fits your needs.
Why dioxide? - Philosophy, feature comparison, and honest limitations
Hexagonal Architecture with dioxide - How dioxide maps to ports-and-adapters
Package Scanning - How scanning works, side effects, and best practices
Dioxide Testing Guide: Fakes Over Mocks - Testing philosophy (fakes over mocks)
Migrating from dependency-injector - Coming from another DI framework?
“I’m integrating with a web framework”¶
Time: 20 minutes
Get dioxide working with your framework of choice.
FastAPI¶
FastAPI Integration - Lifespan, dependency injection, and testing endpoints
Tutorial 4: Lifecycle Management - Async startup/shutdown patterns
Lifecycle Methods: Async/Sync Patterns - Understanding async lifecycle with sync resolution
Django¶
Django and Django REST Framework Integration - Django-specific integration guide
Other Frameworks¶
Getting Started - Core container patterns work everywhere
Scoping Guide - Request scoping for web applications
Lifecycle Methods: Async/Sync Patterns - Async lifecycle in sync frameworks (Flask, Django)
“I want to understand the testing philosophy”¶
Time: 45 minutes
Learn why dioxide prefers fakes over mocks and how to test effectively.
Dioxide Testing Guide: Fakes Over Mocks - Comprehensive testing philosophy and patterns
Testing with Fakes - Practical testing techniques
Testing Patterns - Copy-paste test fixtures and patterns
Migration from Mocks to Fakes - Transitioning from mock-heavy tests
“I need the API reference”¶
Jump directly to the technical documentation.
API Reference - Auto-generated API documentation for all public classes and functions
“I want practical recipes”¶
Browse the cookbook for copy-paste solutions to common problems.
Cookbook - All recipes organized by category
Configuration - Pydantic Settings integration
Database Patterns - SQLAlchemy and repository patterns
Testing Patterns - Test fixtures and patterns
Learning Path Recommendations¶
Your Background |
Recommended Path |
|---|---|
New to DI |
Quick start, then examples 1-4 in order |
Using dependency-injector |
Why dioxide, then migration guide |
Familiar with hexagonal architecture |
Hexagonal architecture guide, then testing |
Mock-heavy test suite |
Testing philosophy, then migration from mocks |
FastAPI developer |
FastAPI cookbook, then lifecycle async patterns |
Flask/Django developer |
Lifecycle async patterns, then cookbook |
Confused about decorators |
Choosing Between @service and @adapter - visual decision tree |