# stapel-attributes 0.4.5

Typed attributes engine: an L1 library (no models, migrations, views, urls, comm surface or service identity of its own) providing a polymorphic type-plugin system (config/dto/dao/type per feature type) behind an open registry, nine built-in types, DTO/DAO validation and normalization, polymorphic DRF serializers with OpenAPI schemas, and a schema-driven (Lit 3) admin config editor. Imported directly by stapel-categories (feature schema) and stapel-listings (value validation).

Contract: axes 1 · extension points 4.
Generated from docs/capabilities.json by `stapel-llms-txt` — do not edit; drift-gated by `make contract-check`.

## Configuration axes — what a product switches on
Settings keys; `default` is what you get by saying nothing. Turning an axis off unmounts the operations it gates.
- EXTRA_TYPES [list, default []] — Extra attribute (feature) types available to categories/listings
  MERGE (additive over the nine built-ins): dotted paths loaded lazily on first registry access. Each entry is a BaseFeatureType subclass or a module that registers types via @register_feature_type on import; loading is additive and idempotent (conf.py, MODULE.md Extension points table).

## Extension points — what a product replaces, fork-free
- ADMIN_EXTRA_CSS / ADMIN_EXTRA_JS [asset_list]
  Extra CSS/JS assets loaded alongside the admin config editor, e.g. a JS widget for an app-layer EXTRA_TYPES entry registered via window.StapelAttributes.registerConfigWidget/registerValueEditor (MODULE.md 'Admin seams', worked example).
- ADMIN_LOCALES [dict_merge]
  Partial dict/static-path merged over the built-in en/ru admin locale strings (MODULE.md 'Admin seams').
- ADMIN_WIDGETS [dotted_path_merge]
  Swap ConfigEditorWidget behaviour per type via STAPEL_ATTRIBUTES['ADMIN_WIDGETS'] (dotted-path merge) (MODULE.md 'Admin seams').
- EXTRA_TYPES [dotted_path_list]
  Open, merge-over-builtins type registry (register_feature_type / registered_types / get_feature_type in registry.py); the flagship open seam this library exposes — no fork needed to add a domain-specific attribute type (MODULE.md 'What this library provides', 'Extension points').

## Fits with — fleet dependencies
- stapel-core (required) — AppSettings config layer, error registry — the only stapel-* dependency (pyproject.toml dependency; conf.py:8, errors.py:9)
