Skip to main content

stapel-listings

CI coverage pypi downloads python license llms.txt

Listings and catalog vertical: a Listing core (owner, opaque category, typed attribute values, price + price_base, inventory) with a draft/publish lifecycle including the moderation takedown state 'blocked', an independent moderation status, a value-validation pipeline delegated to stapel-attributes against a category schema fetched over comm, a publish service, first-class favorites, and the two pull seams its consumers read it through — listings.search_documents / listings.search_export for an indexer and listings.moderation_content for a moderation queue.

Part of the Stapel framework — composable Django apps that deploy as a monolith or as microservices without changing module code.

Install

pip install stapel-listings

At a glance

Fact Value
Version 0.5.0
Python >=3.11 (3.11, 3.12, 3.13, 3.14)
Django djangorestframework>=3.14
HTTP operations 16
Config axes 2
Usage surface 7
Extension points 6
Fleet dependencies stapel-attributes · stapel-categories (optional) · stapel-core

Documentation

capabilities.json · llms.txt (for agents)

What this is

Listing is the marketplace core: an owner, an opaque category, typed attribute values, a two-machine lifecycle + moderation status, a publish pipeline, and first-class favorites. It consumes stapel-categories (feature schema, over comm) and stapel-attributes (value validation), and stays decoupled from search, moderation and currencies (see the boundaries below).

Quick start

INSTALLED_APPS = [
    # ...
    "stapel_listings",
]

# urls.py
path("listings/", include("stapel_listings.urls"))

Requires a categories.features comm Function provider (stapel-categories) for value validation against a category's schema.

Settings

All configuration lives in the STAPEL_LISTINGS namespace (dict setting, flat setting, or env var — resolved lazily). Full table with seam semantics in MODULE.md.

Key Default Meaning
CATEGORY_FEATURES_FUNCTION "categories.features" comm Function resolving a category's feature schema.
PRICE_BASE_CONVERTER identity Dotted-path (amount, currency, base) -> Decimal.
AUTO_APPROVE_ON_PUBLISH False Publish immediately when no moderation module is installed.
REQUIRE_IMAGE_ON_PUBLISH True Require ≥1 image to publish.
MODERATION_TARGET_TYPE "listing" target_type this module answers to in moderation.completed.
LISTING_URL_TEMPLATE "" Public URL template ({listing_id}) for the moderator's card.
DEFAULT_LISTING_TTL_DAYS 30 Days until a published listing expires.

comm surface

Emits (Actions): listing.submitted (moderation boundary), listing.published / listing.updated / listing.removed (search boundary). Consumes: category.changed, moderation.completed, user.deleted. Provides Functions: listings.status, listings.search_documents, listings.search_export, listings.moderation_content. Calls: categories.features.

Boundaries: search/filtering is a separate stapel-search module; this module builds features_search, signals with the listing.* events and hands over the document through listings.search_documents (keyed batch) and listings.search_export (cursor snapshot), but exposes no search endpoints — the events carry identity, so no listing content rides the durable bus and no indexer reads this database. Moderation is a separate stapel-moderation module: this module emits listing.submitted, serves the content over listings.moderation_content and applies the target-generic moderation.completed verdict (including the published → blocked takedown), but runs no moderation pipeline. Re-moderating an edit of a live listing is post-moderation: the lifecycle stays published, moderation_status goes to pending, the edit is visible immediately, and a rejecting verdict removes it through the takedown edge.

Extension points

See MODULE.md — the agent-facing map of every fork-free seam (settings, serializer seams, comm surface, GDPR provider).

Development

pip install -e . && pip install pytest pytest-django ruff
./setup-hooks.sh
pytest tests/

License

MIT — see LICENSE.


This page is assembled by stapel-readme from docs/readme.md plus the contract artifacts in docs/. Edit the prose in docs/readme.md; the badges, facts and links above and below it are generated — do not hand-edit README.md.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stapel_listings-0.5.0.tar.gz (66.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

stapel_listings-0.5.0-py3-none-any.whl (64.3 kB view details)

Uploaded Python 3

File details

Details for the file stapel_listings-0.5.0.tar.gz.

File metadata

  • Download URL: stapel_listings-0.5.0.tar.gz
  • Upload date:
  • Size: 66.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for stapel_listings-0.5.0.tar.gz
Algorithm Hash digest
SHA256 cfad24183dfc5b0c9fe41003ff4f81d56e7c4e93fbe6a967b4dbbe86826b9f48
MD5 f95f31f7c905d970b2f66a507a9cc12e
BLAKE2b-256 3156190f2250ff0001c23ff93b7b8f338a122551cc73e931918e1a794195a27a

See more details on using hashes here.

Provenance

The following attestation bundles were made for stapel_listings-0.5.0.tar.gz:

Publisher: publish.yml on usestapel/stapel-listings

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file stapel_listings-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: stapel_listings-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 64.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for stapel_listings-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d9681a3bd3ec5b4dd98c73c1edd87a0146da0f89f6bfcda85769ebb89434330d
MD5 92acd82414657cfe59abf9897756a5cd
BLAKE2b-256 ab723e13f1372acfaa1afbd67d43b084a127bd0de90993827cebd7d04fe79a84

See more details on using hashes here.

Provenance

The following attestation bundles were made for stapel_listings-0.5.0-py3-none-any.whl:

Publisher: publish.yml on usestapel/stapel-listings

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.9.0

2 files

0.8.0

2 files

0.7.1

2 files

0.7.0

2 files

0.6.2

2 files

0.6.1

2 files

0.6.0

2 files

This release

0.5.0 This release

2 files

0.4.0

2 files

0.3.8

2 files

0.3.7

2 files

0.3.5

2 files

0.3.4

2 files

0.3.3

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page