This repository is the **Dependency Injector** library for Python, a mature and widely-used dependency injection (DI) and inversion-of-control (IoC) framework. It provides a comprehensive set of provider types (Factory, Singleton, Resource, Configuration, etc.), declarative and dynamic containers for organizing providers, and a wiring mechanism that automatically injects dependencies into functions and methods using the `@inject` decorator and `Provide`/`Closing` markers. The library is designed to decouple application components, improve testability, and manage configuration and resource lifecycles in a structured way. The core implementation is written in Cython (`.pyx` files) for performance, with pure-Python fallbacks and type stubs. The architecture is modular: providers are composable building blocks, containers assemble them, and wiring connects them to application code. The library integrates with popular web frameworks (FastAPI, Flask, Django, Aiohttp, Sanic, Starlette) and supports both synchronous and asynchronous modes. It also includes a configuration provider that can load settings from YAML, JSON, INI, environment variables, Pydantic models, and plain dictionaries, with environment variable interpolation and type casting. Key entry points are the `Provider` hierarchy (e.g., `Factory`, `Singleton`, `Resource`), `DeclarativeContainer` and `DynamicContainer` classes, and the `inject` decorator from the wiring module. The library is primarily a development dependency used at build/import time to wire up application components. It has no runtime external dependencies beyond Python itself, though optional integrations (Flask, Aiohttp, etc.) require those frameworks. The extensive test suite and documentation make it a reliable choice for projects needing explicit dependency management.
Mimesis is a Python library for generating high-quality, locale-aware fake data, intended for use in testing, database seeding, API mocking, and data anonymization. Unlike simpler lorem-ipsum generators, it produces realistic names, addresses, dates, financial data, internet-related strings, and more, across 47 locale variants. The architecture is modular: locale-independent and locale-dependent providers (e.g., Person, Address, Internet) load curated JSON datasets, while a suite of schema tools (Field, Fieldset, Schema, SchemaBuilder) allows declarative generation of flat or relational synthetic datasets with lazy evaluation, dependency resolution, and export to CSV/JSON/pickle. A custom Random class with weighted selection and deterministic seeding ensures reproducibility, and optional plugins integrate with factory_boy and pytest-randomly. The codebase is well-structured, extensively typed (mypy strict), and thoroughly tested, with a strong emphasis on performance (~20-30x faster than comparable libraries like Faker). External runtime dependencies are minimal; the only optional ones are pytz and factory-boy.
This repository is the endroid/qr-code PHP library for generating QR codes in multiple output formats including PNG, GIF, WebP, SVG, EPS, PDF, binary text, and console output. It provides a clean object-oriented architecture with immutable value objects (QrCode, Color, Matrix), a Builder facade for convenient construction, and a set of Writer classes each implementing WriterInterface. The library delegates low-level QR encoding to BaconQrCode and handles matrix rendering, logo overlays, and label placement. It includes optional validation by decoding the generated image. The code is modern PHP 8.4, utilizing readonly classes, enums, named arguments, and strict typing. The separation of concerns is clear: QrCode holds data parameters, Matrix encapsulates the binary grid and size calculations, Writers produce format-specific results, and Results provide uniform access to the output. The Builder aggregates all common options and allows per-call overrides. The library is well-maintained with active CI, zero dependabot alerts, and runs on the latest PHP versions.