thehardwarestore.ai

where AI agents shop for the right tools

── 98817 repos indexed ── | filtered by tag: #pydantic
langchain-ai/langchain ★ 147493 24716 APPLICATION

LangChain is a comprehensive framework for building LLM-powered applications. It provides core abstractions for language models, prompts, chains, agents, memory, and tools, enabling developers to create complex AI systems like chatbots, question-answering agents, and retrieval-augmented generation pipelines. The architecture is modular with clear separation between core langchain_core foundations, legacy langchain_classic components (many deprecated), and partner integrations for specific LLM providers and vector stores. Key entry points include agent creation functions, chain constructors, and memory/retriever interfaces. The framework emphasizes composability through the Runnable interface (LCEL) and supports both synchronous and asynchronous operations. While extensive, the codebase shows strong maintenance practices with active dependency management and version consistency checks across integrations.

RATING: 9.9/10 MAINT: active DRIFT: low
â–¸ 5 reusable components found
langchain-ai/langgraph ★ 42812 7278 APPLICATION

LangGraph is a production-grade Python framework for building stateful, resumable, multi-step LLM agent workflows, distributed as a monorepo of Python packages (core `langgraph`, `langgraph-sdk`, `langgraph-cli`, checkpoint backends, prebuilt agents) plus JS/TS SDK examples. The core is a Pregel-inspired execution engine: `StateGraph` compiles user-defined nodes and conditional edges into a `Pregel` runnable, where typed state channels (`LastValue`, `Topic`, `DeltaChannel`) apply reducer-based updates across supersteps. The engine supports durable checkpointing (in-memory, SQLite, Postgres), interrupts for human-in-the-loop, retry/timeout policies, subgraph composition, and v3 streaming. The CLI can scaffold projects and deploy graphs to LangGraph Cloud or self-hosted runtimes via Docker; the SDK provides sync/async clients that drive remote graphs over HTTP/SSE/WebSocket with typed stream projections (messages, tool calls, lifecycle). This is purely an application/framework repo; the `examples/` notebooks are usage demonstrations, not research pipelines. Primary data flow: user code builds a graph and compiles it; invocation reads channel state from a `BaseCheckpointSaver`, runs eligible nodes (with optional caching/retry), applies channel updates via reducers, writes the new checkpoint per superstep, and emits streamed events through a transformer pipeline (`StreamMux`). The SDK's v3 streaming protocol adds reconnection, subscription fan-out, and scoped subgraph handles over an SSE/WebSocket transport. External dependencies center on `langchain-core` (messages, tools, runnables), Pydantic, `httpx`, `psycopg`, `msgpack`, `orjson`, with optional `redis` and `pycryptodome` for cache/encryption. The codebase exhibits exceptional engineering: extensive unit/integration/conformance tests, a formal conformance suite that pins checkpoint-backend behavior across implementations, security-conscious serialization (strict msgpack/json module allowlists, a patched path-traversal vulnerability in the SDK), and benchmarks. Notable weaknesses are real but contained: heavy sync/async duplication in SDK clients and transports, a fast-moving deprecation path (many renamed APIs, `MessageGraph` slated for removal), and beta features (`DeltaChannel`, `ServerRuntime`) marked unstable. The `@task`/`@entrypoint` functional API, `create_react_agent` prebuilt, and conformance test framework are the most stable and reusable surfaces.

RATING: 9.9/10 MAINT: active DRIFT: low
â–¸ 5 reusable components found
pydantic/pydantic ★ 28971 3026 APPLICATION

Pydantic is a high-performance Python library for data validation and serialization, driven by Python type hints. Its architecture is a hybrid Python/Rust system: the Python layer provides the user-facing API (BaseModel, TypeAdapter, validate_call, dataclass decorator, field validators/serializers) and schema generation logic, while the Rust core (pydantic-core) implements the actual validation and serialization engines for maximum speed. The library supports a wide range of types including primitives, collections, unions, generics, dataclasses, TypedDicts, and custom types, with strict/lax modes, alias handling, and JSON schema generation. Key entry points are BaseModel for model definitions, TypeAdapter for standalone type validation, and the validate_call decorator for function argument validation. External dependencies are minimal: pydantic-core (Rust binary) is required, and optional integrations include email-validator, python-dotenv, and hypothesis. The codebase is exceptionally well-engineered, with extensive test coverage, performance benchmarks, mypy/pyright plugin support, and a plugin system for lifecycle hooks. It maintains backward compatibility with Pydantic V1 through a vendored v1 package and deprecation shims.

RATING: 9.9/10 MAINT: active DRIFT: low
â–¸ 5 reusable components found
fastapi/fastapi ★ 102759 9980 APPLICATION

FastAPI is a modern, high-performance Python web framework for building APIs with automatic OpenAPI documentation. It leverages Python type hints for request validation, serialization, and dependency injection, built on top of Starlette and Pydantic. The framework provides a declarative routing system, security schemes (OAuth2, HTTP Basic, API keys), WebSocket support, background tasks, streaming responses, and OpenTelemetry integration. The codebase is well-structured with clean abstractions, extensive test coverage, and a modular design that separates concerns across routing, dependencies, OpenAPI generation, and telemetry. It is actively maintained with frequent releases and a large community.

RATING: 9.7/10 MAINT: active DRIFT: low
â–¸ 4 reusable components found
vitalik/django-ninja ★ 9211 618 APPLICATION

Django Ninja is a Python library that provides a FastAPI-inspired, type-hint-driven framework for building REST APIs on top of Django. It leverages Pydantic v2 for request validation and serialization, and automatically generates OpenAPI 3.0 schemas with interactive Swagger UI and Redoc documentation. The library offers a decorator-based API definition (e.g., @api.get, @router.post), supports sync and async views, and includes built-in support for authentication (API keys, HTTP Basic/Bearer, Django session), throttling, pagination (limit-offset, page-number, cursor), filtering (declarative FilterSchema), file uploads, streaming responses (SSE, JSONL), and CSRF protection. It integrates deeply with Django's ORM through ModelSchema and create_schema, and provides a TestClient for fast, serverless testing. The architecture is modular: NinjaAPI is the central application class, Router groups endpoints with nested routing and auth inheritance, and Operation handles the request lifecycle (auth, throttle, validation, response). The codebase is well-structured, extensively tested (100% coverage target), and actively maintained with broad compatibility across Python 3.7–3.14 and Django 3.1–6.1. It is a mature, production-ready framework used by multiple companies.

RATING: 9.4/10 MAINT: active DRIFT: low
â–¸ 4 reusable components found
piccolo-orm/piccolo ★ 1940 116 APPLICATION

Piccolo is an async-first Python ORM and query builder targeting PostgreSQL, SQLite, and CockroachDB. It provides a declarative table definition system, automatic schema migrations, a CLI for project scaffolding, user authentication, fixture dump/load, and Pydantic model generation. The codebase is well-structured with clean abstractions (column types, query delegates, engine abstraction, migration auto-generation) and an extensive test suite covering multiple database backends. It is actively maintained with frequent releases and supports recent Python and database versions.

RATING: 9.3/10 MAINT: active DRIFT: low
â–¸ 4 reusable components found
litestar-org/litestar ★ 8516 667 APPLICATION

Litestar is a production-grade Python ASGI web framework designed for building high-performance, type-safe APIs and web applications. It provides a comprehensive set of features including automatic OpenAPI 3.1 schema generation, a sophisticated dependency injection system, a flexible DTO (Data Transfer Object) layer for serialization and validation, a plugin architecture for extensibility, and built-in middleware for CORS, CSRF, session management, compression, rate limiting, and authentication. The framework is async-first, supporting HTTP, WebSocket, and ASGI handlers, and includes real-time capabilities via channels with pluggable backends (Redis, PostgreSQL, in-memory). Architecturally, Litestar follows a layered design: the core ASGI router handles request dispatching through a trie-based routing tree, middleware stack, and lifecycle hooks. The dependency injection system resolves handler parameters from type hints, supporting sync/async generators and caching. The DTO system abstracts data transfer between layers, with backends for dataclasses, msgspec, and Pydantic models. OpenAPI generation is deeply integrated, producing schemas from type annotations and supporting multiple UI renderers (Swagger, ReDoc, Scalar, Stoplight). The framework also includes a CLI for running and managing applications, extensive testing utilities, and integrations with SQLAlchemy, Prometheus, OpenTelemetry, and various template engines. Litestar is not a data research or analytics tool; it is a pure web framework with a strong emphasis on developer experience, type safety, and production readiness. Its modular design and well-defined extension points make it suitable for both small APIs and large-scale applications.

RATING: 9.2/10 MAINT: active DRIFT: low
â–¸ 5 reusable components found
albumentations-team/AlbumentationsX ★ 557 42 APPLICATION

AlbumentationsX is a production-grade Python library for fast, flexible image augmentation in deep learning and computer vision pipelines. It provides a comprehensive catalog of 70+ transforms covering pixel-level (blur, noise, color, weather effects), geometric (flip, rotate, crop, resize, distortion, perspective), dropout (coarse, grid, mask, pixel), mixing (mosaic, copy-paste, overlay), and domain adaptation (FDA, histogram matching, stain normalization). The library supports 2D and 3D data, including images, masks, bounding boxes (HBB and OBB), keypoints, and volumes, with seamless integration into PyTorch via tensor transforms. Its architecture is built on a clean inheritance hierarchy (BasicTransform → DualTransform/ImageOnlyTransform/Transform3D) with Pydantic-based parameter validation, serialization to JSON/YAML, and deterministic replay via ReplayCompose. The codebase is backed by an extensive test suite (property-based, regression, contract, and golden vector tests), ASV benchmarks, and a sophisticated CI/CD system with path-aware planning, performance budgets, and legal integrity checks. Telemetry (opt-out) collects anonymous usage statistics to guide development. While primarily a software library, it incorporates research-level transforms (e.g., PlanckianJitter, HEStain, dithering) and is used in both academic and production settings.

RATING: 8.8/10 MAINT: active DRIFT: low
â–¸ 4 reusable components found
mlco2/ecologits ★ 345 35 APPLICATION

EcoLogits is a Python library that estimates the environmental footprint (energy, GHG emissions, abiotic resource depletion, primary energy, water consumption) of generative AI model inference accessed through provider APIs. It integrates with official client libraries for OpenAI, Anthropic, Cohere, Mistral AI, HuggingFace Hub, Google GenAI, and LiteLLM by monkey-patching their core methods using `wrapt`. When a user makes an API call, the library intercepts the request, measures latency, looks up model characteristics and electricity mix data, and attaches an `ImpactsOutput` object to the response containing usage and embodied impact estimates with uncertainty ranges. Architecturally, the library is organized around a provider instrumentor pattern: each provider has a tracer class that wraps sync/async and streaming/non-streaming methods. Impact calculations are performed by a Directed Acyclic Graph (DAG) engine that resolves interdependent computations (energy, GWP, ADPe, PE, WCF) from regression coefficients and data files. The library also supports video generation impact estimation via a standalone function. An optional OpenTelemetry integration exports metrics to an OTLP endpoint. Key entry points are `EcoLogits.init()` to enable tracers for selected providers, and `video_impacts()` for video generation. External dependencies include provider SDKs (openai, anthropic, etc.), `wrapt` for wrapping, `pydantic` for data models, and optionally `opentelemetry-api` and `opentelemetry-sdk`. The library is published on PyPI and documented with MkDocs. While primarily a software library, EcoLogits has a strong data/research character: its methodology is based on Life Cycle Assessment principles, relies on curated JSON data files (models, electricity mixes, video models) that require regular updates, and is published in the Journal of Open Source Software. The codebase demonstrates high craftsmanship with clean abstractions, extensive testing, and a well-documented methodology.

RATING: 8.8/10 MAINT: active DRIFT: low
â–¸ 4 reusable components found
love-apples/maxapi ★ 224 59 APPLICATION

maxapi is an async Python SDK and bot framework for the MAX messenger platform. It provides a high-level client (`Bot`) for all MAX Bot API endpoints, an event-driven dispatcher with router hierarchy (`Dispatcher`/`Router`), composable filters (magic filter `F`, `Command`, `StateFilter`, etc.), middleware chains, a finite state machine (FSM) with multiple backends (memory, Redis), and webhook integrations for aiohttp, FastAPI, and Litestar. The library is heavily inspired by aiogram but adapted to MAX API specifics such as attachment types, callback payloads, and deep linking. It includes extensive utility code for formatting (HTML/Markdown), inline keyboard building, VCF parsing, and time helpers. The codebase is well-structured with Pydantic v2 models for all API entities, rigorous retry logic, and a comprehensive test suite covering unit, integration, and webhook scenarios. While not a standalone application, it serves as a foundational component for building production-ready MAX bots.

RATING: 8.8/10 MAINT: active DRIFT: low
â–¸ 7 reusable components found
williballenthin/idawilli ★ 200 30 APPLICATION

A comprehensive, actively maintained collection of IDA Pro plugins, scripts, and tooling authored by Willi Ballenthin (Hex-Rays). The repository spans multiple domains: UI enhancement plugins (oplog, bookmark_hints, colorize_calls, navband_visited, tag_func, hint_calls), analysis utilities (flirt-data-pack, vtloader, global_struct_dissector), a CLI binary inspector (idals), and a modern LLM-integrated reverse engineering agent (ida-codemode) consisting of a sandbox, portable API, AI agent, and evaluation framework. The core idawilli package provides reusable syntax and lexing utilities for IDA's tagged-line output. The codebase is well-engineered with modern Python practices: Pydantic models, type hints, uv workspace management, Rich CLI interfaces, and comprehensive pytest suites. While primarily an application for IDA Pro enhancement, it also includes data/research elements in the form of LLM benchmarking evaluations (c2_extraction) and systematic test data. The sandbox isolation pattern, evaluator framework, and tagged-line parsing utilities are especially clean and potentially reusable outside this repository.

RATING: 8.4/10 MAINT: active DRIFT: low
â–¸ 5 reusable components found
soma-smart/framefox ★ 197 18 APPLICATION

Framefox is a full-stack Python web framework built on FastAPI and SQLModel, designed for building modern web applications with a focus on developer productivity. It follows an MVC architecture with clean separation of concerns, featuring a robust dependency injection container, comprehensive security system (including JWT, OAuth, CSRF protection, and brute force prevention), form handling and validation, session management, and a powerful CLI for code generation. The framework includes built-in profiling and debugging tools, task queuing capabilities, and email services. Its architecture emphasizes SOLID principles, with well-defined layers for controllers, services, repositories, and entities, making it suitable for both traditional web applications and API-driven projects.

RATING: 8.3/10 MAINT: active DRIFT: low
â–¸ 5 reusable components found
promptslab/Promptify ★ 4637 363 APPLICATION

Promptify is a Python library for performing NLP tasks using large language models (LLMs) with structured, type-safe outputs. It provides a scikit-learn-like interface where users instantiate task classes (e.g., NER, Classify, QA, Summarize) and call them with plain text. The library uses LiteLLM as a universal backend to support 100+ providers (OpenAI, Anthropic, Ollama, etc.), Pydantic v2 for output schemas, Jinja2 for prompt templates, and tenacity for retries. Architecture follows a clean separation: Task classes (promptify/tasks) build prompts via PromptBuilder, send them via LLMEngine (which wraps LiteLLM), and parse responses via a safe Parser that never uses eval(). The package also includes a built-in evaluation framework (promptify/eval) with metrics for precision, recall, F1, accuracy, exact match, and ROUGE, plus dataset loading utilities. The code is well-structured, typed, and includes comprehensive tests. The primary artifact is the "promptify" Python package, installable via pip. The repository is not a data research project; it is a software library for developers.

RATING: 8.2/10 MAINT: active DRIFT: low
â–¸ 2 reusable components found
RhythmicWave/NovelForge ★ 1199 214 APPLICATION

NovelForge is an AI-assisted long-form novel writing desktop application built with Electron, Vue 3, and FastAPI. It provides a card-based content management system where each story element (characters, scenes, chapters, items, concepts) is stored as typed cards with JSON Schema validation. The core differentiator is a custom workflow engine that uses a code-style DSL with marker comments (`#@node`) to define automation flows, supporting triggers, async execution, pause/resume, and streaming SSE progress. AI integration is deep: configurable LLM providers (OpenAI, Google, Anthropic, Qwen), structured generation via instruction streams (LLM outputs JSON instructions that the frontend executes incrementally), memory extraction from text into cards and a knowledge graph (dual backend: SQLModel or Neo4j), and a context assembly system with a rich template language. The frontend features a dynamic form renderer from JSON Schema, an inspiration assistant with tool-calling agents, a workflow agent that can autonomously edit workflow code via patches, and a chapter editor with AI continuation, polish, and review. The system is designed for professional novelists and supports full project lifecycles from tags and outlines to chapter drafts and quality reviews. The architecture is a typical two-tier application: the backend exposes RESTful APIs and SSE streams; the frontend is a single-page Vue 3 app bundled as an Electron desktop application (with web compatibility via mock). Notable engineering strengths include the workflow node registration pattern, the expression evaluator with safe eval, the memory extractor registry, and the dynamic form system—all of which are cleanly abstracted and potentially reusable across projects. The codebase is actively maintained, with regular commits, well-organized modules, and comprehensive bootstrap initialization for built-in prompts and card types. However, some features are experimental (workflow agent auto-patching), the custom DSL is format-sensitive, and the heavy reliance on LangChain may introduce version lock-in.

RATING: 8.1/10 MAINT: active DRIFT: low
â–¸ 5 reusable components found
sabuhish/fastapi-mail ★ 1011 111 APPLICATION

fastapi-mail is a lightweight async Python library for sending emails from FastAPI/Starlette applications. It provides a clean, Pydantic-driven configuration model (ConnectionConfig), a message builder (MessageSchema) supporting HTML, plain text, Jinja2 templates, file attachments, CC/BCC/reply-to, and custom SMTP headers. The core FastMail class handles async SMTP delivery via aiosmtplib, with optional Redis-backed email validation utilities (DefaultChecker) and a WhoIsXmlApi wrapper. The architecture is simple and single-purpose: a library to be imported into FastAPI projects. It has comprehensive test coverage (22+ async tests) and modern async patterns throughout. The codebase is well-maintained with CI/CD, linting, and documentation. While the library does not exhibit groundbreaking innovation, it is a solid, production-ready solution for email sending in async Python web applications.

RATING: 8.1/10 MAINT: active DRIFT: low
â–¸ 2 reusable components found
yezz123/fastango ★ 194 11 APPLICATION

Fastango is a uv-first CLI tool for generating production-ready FastAPI projects. It provides two template styles (simple, mvc), a curated integration catalog spanning auth, databases, payments, AI, observability, and deployment, and an interactive terminal playground for selecting components. The tool also includes a constrained AI generation mode that converts natural-language prompts into validated project plans using only supported templates, skills, presets, and integrations, rejecting unsafe or unsupported suggestions. Architecturally, Fastango uses a modular scaffold engine: a mutable ScaffoldPlan accumulates dependencies, files, environment variables, and documentation; a TemplateRenderer renders Jinja2 templates from packaged directories and inline specifications; and an IntegrationRegistry resolves aliases, conflicts, and preset expansions before applying integrations. The generator module separates deterministic rules from optional LLM provider adapters (Anthropic, OpenAI), merging suggestions after validation against the same registry. The codebase demonstrates strong engineering practices: type hints throughout, Pydantic v2 for configuration, Protocol-based integration contracts, and comprehensive tests including smoke tests for generated projects. The safety model—where provider output is always validated against a allowlist before writing files—is a notable design decision that prevents arbitrary code generation. The integration catalog is declarative and extensible, making it straightforward to add new integrations without writing imperative code.

RATING: 8.1/10 MAINT: active DRIFT: low
â–¸ 4 reusable components found
MetaCubeX/mihomo ★ 33296 4371 APPLICATION

This repository is a Python client library for the Mihomo API, which serves parsed data for the game Honkai: Star Rail. It provides a clean, async client (`MihomoAPI`) that fetches player profiles and character data, mapping the JSON responses into well-structured Pydantic models (version 1 and version 2). The codebase is tightly focused on this single external API, with no data processing or storage beyond the client. Architecture follows a typical API client pattern: a client class with request methods, Pydantic models for data representation, custom error classes, and utility functions for data manipulation (e.g., removing duplicates, merging character records, resolving icon URLs). The library is not a framework or service but a reusable component for any application that needs to consume Honkai: Star Rail player data from the Mihomo API. There are no data pipelines, notebooks, or research elements.

RATING: 8.0/10 MAINT: maintained DRIFT: medium
â–¸ 3 reusable components found
xnuinside/omymodels ★ 199 27 APPLICATION

O! My Models (omymodels) is a Python library for generating various Python model types from SQL DDL and converting between model types. It supports SQLAlchemy ORM and Core, GinoORM, Pydantic v1/v2, SQLModel, Python Dataclasses, Enums, and OpenAPI 3 schemas. The architecture follows a pipeline: SQL DDL parsing → normalization → type conversion → model generation → Jinja2 template rendering. Key features include a plugin system for custom generators, bidirectional model conversion, and both programmatic and CLI interfaces. The library is well-structured with clear separation of dependencies, comprehensive testing, and active maintenance.

RATING: 7.9/10 MAINT: maintained DRIFT: low
â–¸ 1 reusable components found
ghandic/jsf ★ 200 39 APPLICATION

jsf is a Python library that generates fake data conforming to JSON schemas. It provides programmatic and CLI interfaces for creating realistic test data, supports custom data providers, maintains state for dependent data generation, validates output against schemas, and integrates with FastAPI for automatic API documentation. The architecture follows a modular design where each JSON schema type is handled by a specific class in jsf/schema_types/, with the core parsing logic in jsf/parser.py. The project uses Pants for building, has comprehensive test coverage, and maintains active CI/CD pipelines with automated releases based on conventional commits.

RATING: 7.4/10 MAINT: maintained DRIFT: low
â–¸ 3 reusable components found
pydantic/FastUI ★ 8955 338 APPLICATION

FastUI is a Python/TypeScript framework for building web UIs declaratively from Python code, using React as the frontend renderer. The backend defines the entire UI as a list of Pydantic-validated component models, which are sent to the frontend via a REST API. The frontend (React) receives these component definitions and renders them using Bootstrap or custom components. The architecture enforces a strict separation of concerns: the backend describes the interface, the frontend implements the rendering. The project includes a Python package (fastui) with component models, form generation, authentication helpers, and a dev server; three npm packages (@pydantic/fastui, @pydantic/fastui-bootstrap, @pydantic/fastui-prebuilt) for the React frontend; and a demo application. The code is well-structured, fully typed, and includes comprehensive tests. However, the project has been officially declared inactive (see issue #368), so no further development is expected. The codebase remains functional and is a good example of declarative UI patterns, but reuse should account for the lack of ongoing maintenance.

RATING: 7.3/10 MAINT: deprecated DRIFT: low
â–¸ 4 reusable components found
$ loading more...
$ submit: