{"categories":[{"label":"Python Modules","url":"https://skillfed.io/packages/category/software-development-libraries-python-modules/5"},{"label":"WWW/HTTP","url":"https://skillfed.io/packages/category/internet-www-http/2"},{"label":"Application Frameworks","url":"https://skillfed.io/packages/category/software-development-libraries-application-frameworks"}],"enrichment":{"capability":"ItemAdapter wraps data container objects (dicts, dataclasses, attrs, pydantic, Scrapy items) to provide a uniform dict-like interface for reading and modifying them regardless of their underlying type.","skillfed_tags":["data-container-abstraction","scrapy-integration","dataclass-wrapper"],"use_cases":["Normalize access to Scrapy items and plain dicts in a single pipeline without type-checking branches.","Build generic data transformation code that works with dataclasses, attrs, or pydantic models interchangeably.","Extract and convert nested item structures to plain dicts for JSON serialization or logging.","Inspect field metadata and names from dataclass or pydantic models at runtime for validation or schema generation.","Write middleware or utilities that accept multiple item types and treat them uniformly."],"what_it_does":"ItemAdapter is a wrapper class that normalizes access to different data container types\u2014dicts, dataclasses, attrs objects, pydantic models, and Scrapy items\u2014under a single dict-like interface. You wrap an object in ItemAdapter and then read, modify, and query it using standard dictionary operations (indexing, get, update, len) regardless of whether the underlying object is a plain dict, a dataclass, or a Scrapy Item.\n\nThe package is designed for code that needs to handle multiple container types uniformly, particularly in data pipelines and web scraping workflows. It implements Python's MutableMapping protocol, so adapters feel like dictionaries. It also provides utility methods like asdict() for recursive conversion to plain dicts, and class-level methods to inspect field names and metadata from item classes before instantiation.","worth_installing":"Yes. ItemAdapter is actively maintained, has no runtime dependencies, installs with low friction, carries no security vulnerabilities, and solves a real problem for anyone working with multiple data container types. It's particularly valuable in Scrapy projects but useful anywhere you need a uniform interface across dicts, dataclasses, attrs, and pydantic models."},"id":"itemadapter","links":{"html":"https://skillfed.io/packages/itemadapter","md":"https://skillfed.io/packages/itemadapter.md","pypi":"https://pypi.org/project/itemadapter/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2026-01-08","license_spdx":"BSD-3-Clause","license_treatment":"permissive","name":"itemadapter","python_support":"supports_current","summary":"Common interface for data container classes"},"popularity":{"monthly_downloads":2948020,"position":2812,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"0.13.1"}
