pydantic-collections
Collections of pydantic models
Decision gist · record as of 2026-08-14
Yes, if you are using pydantic v1.x or early v2.x and need a lightweight, low-friction way to validate and serialize collections of models. No, if you require active maintenance or plan to upgrade pydantic significantly in the near future—the package is archived and abandoned, with no recent updates. Consider whether pydantic's native list validation (e.g., `list[MyModel]`) or a simple wrapper function meets your needs instead.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires pydantic>=1.8.2,<3.0 and Python>=3.7; behavior differs between pydantic v1.x and v2.x (dict() vs model_dump(), json() vs model_dump_json()).
- Low install friction with only two runtime dependencies (pydantic and typing-extensions).
- However, the repository is archived and marked abandoned as of the fact sheet date, with no commits since 2026-08-05 and the last release over 2 years old.
License · maintenance · safety
Apache 2 (permissive) — Licensed under Apache 2, a permissive open-source license that allows commercial and private use with minimal restrictions.
last release 2024-07-09 (766 days) · last repo commit 2026-08-05 · 47 stars · archived
0 known vulnerabilities (OSV.dev, 2026-08-14) · 552,306 downloads/mo, #6,043 on PyPI
Alternatives
Verify before relying
pip install pydantic-collections
from pydantic import BaseModel
from pydantic_collections import BaseCollectionModel
class User(BaseModel):
id: int
name: str
class UserCollection(BaseCollectionModel[User]):
pass
users = UserCollection([{'id': 1, 'name': 'Alice'}])
print(users.model_dump_json())- Whether the package works reliably with pydantic 2.x given the archived status and age of last release.
- Whether strict assignment validation (the default) is the right choice for most use cases or if it causes friction.
- Current community adoption and whether alternatives have emerged since abandonment.
What it is and what it does
pydantic-collections wraps a list of pydantic models in a `BaseCollectionModel` class that applies validation, serialization, and type checking to the entire collection. It acts as a container that enforces that all items conform to a specified pydantic model schema, supporting both strict and lenient assignment modes. The class inherits from pydantic's `BaseModel`, so collections can be nested as fields in other models and serialized to JSON or dictionaries using pydantic's standard methods.
The package is designed for workflows where you need to load, validate, and serialize batches of structured data—such as API responses containing arrays of objects, CSV imports, or database result sets. It reduces boilerplate by letting you define a collection type once and reuse it across your codebase. However, the repository is archived and abandoned, with no active maintenance since mid-2026, which may pose a risk if you rely on future compatibility with newer pydantic versions or need bug fixes.
Use it for
- Validate and type-check a list of API response objects before processing them in your application.
- Wrap CSV or JSON imports in a collection model to ensure all records conform to a schema before persisting.
- Nest a collection of models as a field in a parent pydantic model for hierarchical data validation.
- Serialize a batch of model instances to JSON with automatic datetime and custom type handling.
- Enforce strict type safety when appending items to a collection to catch invalid assignments early.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are using pydantic v1.x or early v2.x and need a lightweight, low-friction way to validate and serialize collections of models.
No, if you require active maintenance or plan to upgrade pydantic significantly in the near future—the package is archived and abandoned, with no recent updates. Consider whether pydantic's native list validation (e.g., `list[MyModel]`) or a simple wrapper function meets your needs instead.
Install
pydantic-collections on PyPI
Before you install
Low install friction with only two runtime dependencies (pydantic and typing-extensions). However, the repository is archived and marked abandoned as of the fact sheet date, with no commits since 2026-08-05 and the last release over 2 years old.
Requires pydantic>=1.8.2,<3.0 and Python>=3.7; behavior differs between pydantic v1.x and v2.x (dict() vs model_dump(), json() vs model_dump_json()).
License in practice
Licensed under Apache 2, a permissive open-source license that allows commercial and private use with minimal restrictions.
Quickstart
pip install pydantic-collections
from pydantic import BaseModel
from pydantic_collections import BaseCollectionModel
class User(BaseModel):
id: int
name: str
class UserCollection(BaseCollectionModel[User]):
pass
users = UserCollection([{'id': 1, 'name': 'Alice'}])
print(users.model_dump_json())
Verify before relying
- Whether the package works reliably with pydantic 2.x given the archived status and age of last release.
- Whether strict assignment validation (the default) is the right choice for most use cases or if it causes friction.
- Current community adoption and whether alternatives have emerged since abandonment.
Package facts
| License | Apache 2 permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagespydantictyping-extensions |
| Maintenance | Abandoned 766 days since the last release |
| Last repo commit | repository archived |
| First released | |
| Downloads | 552,306 / month, #6,043 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
Evidence: pydantic_collections-0.6.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “pydantic model collections”
- pydantic-collectionsProvides a `BaseCollectionModel` class that wraps collections of…
- pydantic-mongoProvides a Repository pattern for MongoDB with Pydantic model…
- odmanticODMantic is an async-first Object Document Mapper for MongoDB that…
Give your agent the search over MCP, or paste the wish link into any chat.
More Application Frameworks packages
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Textual is a Python framework for building cross-platform user interfaces that run in the terminal or web browser using a modern, component-based API.
Install it if you're developing CLI tools, dashboards, or interactive terminal applications.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Build and connect to Model Context Protocol servers that expose tools, resources, and prompts to LLM applications over stdio, HTTP, or SSE transports.
Install it if you need to build or connect to servers.
Werkzeug is a WSGI utility library providing request/response objects, URL routing, an interactive debugger, HTTP utilities, and a development server for building web applications.
See also pydantic-numpy · pydantic-factories · pydantic_yaml · drf-pydantic · pydantic-mongo · stac-pydantic · pydantic-to-pyarrow · Flask-Pydantic · numpydantic · bump-pydantic