The Dependency Injector is a mature, feature-rich dependency injection framework for Python. It provides core DI patterns through providers (Factory, Singleton, Resource, etc.), containers (Declarative/Dynamic), and wiring mechanisms (@inject decorator). The framework emphasizes explicit dependency declaration, testability, and loose coupling while supporting async/await, configuration management from multiple sources, and runtime provider overriding. It includes framework-specific integrations (Flask, Django, FastAPI, etc.) via its wiring module and extension system, though the core remains framework-agnostic. Architecturally, the codebase separates concerns into distinct modules: providers handle object creation/lifecycle, containers manage provider resolution and hierarchy, wiring enables automatic dependency injection into functions/methods, resources manage lifecycle-dependent objects (e.g., DB connections), and configuration providers unify settings from YAML/INI/JSON/env. The framework uses Cython for performance-critical components while maintaining a pure Python interface. Comprehensive documentation, extensive test suite, and numerous examples demonstrate practical integration patterns across web applications, daemons, and cloud services. The project shows strong maintenance with frequent releases, active issue triage, and broad Python version support (3.8-3.14). Technical drift is low due to proactive dependency updates, removal of deprecated Python versions, and adherence to modern Python practices. The codebase exhibits high craftsmanship in its provider patterns, particularly the Resource provider's context-manager semantics and the wiring module's automatic dependency resolution, making it a reusable dependency injection solution for Python applications.
This repository provides a Python library for parsing human-readable time expressions into seconds. The core functionality is implemented in the `timeparse` function, which accepts strings in various formats (e.g., '32m', '2h32m', '1w3d2h32m', '4:13:02', '2 days, 4:13:02') and returns the equivalent duration in seconds as an integer or float. The library handles optional signs, fractional values, and ambiguous colon-separated values via a granularity parameter. It has no external dependencies and is designed for simplicity and reliability. The library is structured as a single module with a clear public interface. The implementation uses a series of regular expressions to match different time formats and converts the matched components to seconds using predefined multipliers. The code is well-tested with a comprehensive test suite that covers the various input formats and edge cases. Despite its simplicity, the library demonstrates careful attention to detail in handling the complexities of time expression parsing, such as supporting both written and abbreviated units, handling spaces and commas as separators, and providing control over the interpretation of colon-separated values.
CherryPy is a mature, production-grade Python web framework that maps HTTP requests to Python callables using an object-oriented approach. It provides a built-in HTTP server (via Cheroot), a flexible configuration system, a publish/subscribe bus for lifecycle management, and a rich middleware/tool system for authentication, sessions, caching, static file serving, and more. The architecture is modular: the core request/response pipeline, dispatchers (tree-walking, method-based, routes), and a plugin system allow deep customization. CherryPy can be used standalone or embedded in other WSGI servers. It is not a data research project; it is a pure application framework with extensive testing and documentation.
pysheeet is a comprehensive Python cheat sheet and reference repository. Although it is classified as an application because it contains a Flask web server and operational scripts, its dominant character is educational reference content: a Sphinx-built documentation site with runnable, tested code examples under `src/basic/`, covering core Python, asyncio, concurrency, networking, security, databases, C/C++ extensions, and more recent LLM/HPC topics. The repository also ships a Claude Code plugin that exposes the cheat sheets as AI skills. Beyond documentation, the repo contains real operational artifacts for distributed LLM work: Slurm/Docker launch scripts for vLLM, SGLang, and TensorRT-LLM, Megatron training recipes, NCCL broadcast benchmarks, and Ray-on-Slurm patterns. These scripts demonstrate practical HPC skills such as EFA/NCCL tuning, multi-node container orchestration, and profiling with nsys/VizTracer. The code quality is solid overall: examples are well-structured, many have pytest coverage, and the Flask serving layer is security-conscious. The main weaknesses are duplication across LLM vendor scripts, hardcoded cluster-specific paths, and documentation that occasionally references older Python or library versions, which creates moderate technical drift.