Metadata-Version: 2.4
Name: abcdi-config
Version: 0.0.1
Summary: A Python library for configuration-based dependency injection using the abcdi library
Author-email: Julian Kenwood <julian.kenwood@example.com>
License: MIT
Project-URL: Homepage, https://github.com/nomad010/abcdi-config
Project-URL: Repository, https://github.com/nomad010/abcdi-config
Project-URL: Issues, https://github.com/nomad010/abcdi-config/issues
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.13
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: abcdi==0.7.0
Requires-Dist: annotated-types==0.8.0
Requires-Dist: pydantic==2.13.5
Requires-Dist: pydantic-core==2.46.5
Requires-Dist: pydantic-settings==2.15.0
Requires-Dist: python-dotenv==1.2.4
Requires-Dist: pyyaml==6.0.3
Requires-Dist: typing-extensions==4.16.0
Requires-Dist: typing-inspection==0.4.4
Provides-Extra: dev
Requires-Dist: build>=0.10.0; extra == "dev"
Requires-Dist: twine>=4.0.0; extra == "dev"
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pylint>=2.15.0; extra == "dev"
Requires-Dist: mypy>=1.0.0; extra == "dev"
Dynamic: license-file

# abcdi-config

A Python library for configuration-based dependency injection using the abcdi library.
Define your application dependencies in YAML configuration files and automatically
instantiate them with proper dependency injection.

## Features

- Configuration-driven dependency injection
- YAML-based configuration files
- Factory pattern for creating instances
- Support for environment variable overrides
- Type safety with Pydantic validation
- Lazy dependency loading support

## Installation

```bash
pip install abcdi-config
```

## Quick Start

```python
from pathlib import Path
from abcdi_config import load_configuration, configuration
from abcdi_config.schema import Config

# Load configuration from YAML file
load_configuration(Path("config.yaml"), Config)

# Access the loaded configuration
config = configuration()

# Get dependencies using abcdi
import abcdi
db = abcdi.get_dependency('database')
```

## Configuration Format

```yaml
dependencies:
  database:
    class_: sqlalchemy.create_engine
    kwargs:
      url: postgresql://user:pass@localhost/db
      echo: true
  
  api_client:
    class_: requests.Session
    kwargs:
      timeout: 30
```

## Development

This project uses `uv` for dependency management and virtual environments.

### Setup

```bash
# Install dependencies
uv sync

# Or install dependencies into your existing virtualenv
uv pip sync requirements.txt dev-requirements.txt
```

### Linting

#### Pylint

Pylint is configured with a focus on reducing false positives for test files while catching real issues in production code.

```bash
uv run pylint src/ tests/
```

#### MyPy

MyPy type checking is configured to skip third-party library stubs.

```bash
uv run mypy src/ tests/
```

### Running Tests

```bash
uv run pytest tests/
```
