Skip to main content

Listings and catalog for the Stapel framework

Project description

stapel-listings

CI codecov PyPI

Listings and catalog vertical for the Stapel framework — composable Django apps that deploy as a monolith or as microservices without changing module code.

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).

Install

pip install stapel-listings
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.
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 Function: listings.status. Calls: categories.features.

Boundaries: search/filtering is a separate stapel-search module fed by the listing.* events (this module builds features_search but exposes no search endpoints); moderation is a separate stapel-moderation module (this module emits listing.submitted and applies moderation.completed, it runs no moderation pipeline).

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

Project details


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.3.1.tar.gz (42.0 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.3.1-py3-none-any.whl (42.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: stapel_listings-0.3.1.tar.gz
  • Upload date:
  • Size: 42.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for stapel_listings-0.3.1.tar.gz
Algorithm Hash digest
SHA256 6fbd9141d79955eb2aa12b93130980a4ee1dd482986b0af1f5cc5e199fceaf6f
MD5 87bb7b970e95ca13617a547012a12587
BLAKE2b-256 453706a70c376daf2eb903a2ba6d8ca8259b6a8b903ccbd78b380e6f7598f9f1

See more details on using hashes here.

Provenance

The following attestation bundles were made for stapel_listings-0.3.1.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.3.1-py3-none-any.whl.

File metadata

  • Download URL: stapel_listings-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 42.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for stapel_listings-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 12cbe18e268b707d3a5f36636b27356c386850137fae592e2e67065776549d6f
MD5 cdecc0ccc6dad37a528e5f0e6155a8fc
BLAKE2b-256 0206d78e6ed29e579c3aa95271f9b0f67cf07451bd6ad49ac191cde7b34cc71e

See more details on using hashes here.

Provenance

The following attestation bundles were made for stapel_listings-0.3.1-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.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page