Skip to main content

stapel-shop

CI coverage pypi downloads python license llms.txt

Composite preset for a catalog shop (categories + typed attributes + listings + reviews): wires stapel-categories, stapel-listings and stapel-reviews into one INSTALLED_APPS/urls/config bundle, defaults reviews' TARGET_TYPES to the catalog's listings, and owns the one piece of real cross-domain glue a composite is allowed to know both sides of: ListingReviewSummaryProjection (reviews -> listings per-listing rating aggregate, local live_query in the monolith or event-carried state transfer when reviews is split into its own service).

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

Install

pip install stapel-shop

At a glance

Fact Value
Version 0.2.18
Python >=3.11 (3.11, 3.12, 3.13, 3.14)
Fleet dependencies stapel-attributes · stapel-categories · stapel-listings · stapel-reviews

Documentation

capabilities.json · llms.txt (for agents)

Likes/favourites are NOT included yet: stapel-engagement does not exist. They arrive as a MINOR bump of this composite once it does.

Assemble (one line)

pip install stapel-tools
stapel-assemble myshop --libs shop
cd myshop && make test

That expands shop through the STAPEL_LIBS requires closure and wires every member module into INSTALLED_APPS, requirements.txt, urls.py and CONFIG.MD, then runs the verify gates.

Manual wiring (no scaffold)

# settings.py
from stapel_shop import preset

INSTALLED_APPS = [
    # ... django/stapel-core baseline (incl. stapel_core.django.projections)
    "stapel_categories",
    "stapel_listings",
    "stapel_reviews",
    "stapel_shop",
]
for _k, _v in preset.SETTINGS_DEFAULTS.items():
    globals().setdefault(_k, _v)

# urls.py
from django.urls import include, path

urlpatterns = [
    path("categories/", include("stapel_categories.urls")),
    path("listings/", include("stapel_listings.urls")),
    path("reviews/", include("stapel_reviews.urls")),
]

Config checklist (fill these, in the generated project's CONFIG.MD too)

Key Note
STAPEL_REVIEWS["TARGET_TYPES"] prefilled by stapel_shop.preset.SETTINGS_DEFAULTS (targets listing); add can_review/can_moderate Functions to restrict
STAPEL_LISTINGS["BASE_CURRENCY"] default USD — set your currency
STAPEL_LISTINGS["DEFAULT_LISTING_TTL_DAYS"] default 30
STAPEL_REVIEWS["RATING_MIN"/"RATING_MAX"] defaults 1..5

Glue (what this package actually contains)

  • stapel_shop.projections.ListingReviewSummaryProjection — reviews→listings rating aggregate. Local mode (monolith): live reads through reviews.aggregates_by_keys. Remote mode: ListingReviewSummary table fed from reviews.review.published/hidden facts, rebuilt from reviews.aggregates_export.
  • Read it ONLY through stapel_core.comm.projections.read("shop.listing_review_summary", keys=[...]){key: {"avg": float, "count": int}}, the same shape in both modes; a key with no published review is absent from the answer.
  • Requires stapel-reviews >= 0.2, the release that shipped both Functions this projection is declared against.

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_shop-0.2.18.tar.gz (23.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_shop-0.2.18-py3-none-any.whl (24.1 kB view details)

Uploaded Python 3

File details

Details for the file stapel_shop-0.2.18.tar.gz.

File metadata

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

File hashes

Hashes for stapel_shop-0.2.18.tar.gz
Algorithm Hash digest
SHA256 f9925f15806cc16b6c6fbe57547b03d195bb3b0c26e14ba09982bd39356577a9
MD5 521736c18261a41fdc4191976bbc8211
BLAKE2b-256 9278b09ae95a991295d0b332fe32b55e0daa9021d5e962f58d9f90d0f488cf6d

See more details on using hashes here.

Provenance

The following attestation bundles were made for stapel_shop-0.2.18.tar.gz:

Publisher: publish.yml on usestapel/stapel-shop

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_shop-0.2.18-py3-none-any.whl.

File metadata

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

File hashes

Hashes for stapel_shop-0.2.18-py3-none-any.whl
Algorithm Hash digest
SHA256 a9c3efae46532bc4de5e51d9d1dd8be7946abac75847d8af2b936811cd91ecd1
MD5 beaf65e6cb795c5a5f9739eab3a64853
BLAKE2b-256 59ca32eb73569b527d0d8e322eee4c261d52372dc18af9d3ca1ed49571c64083

See more details on using hashes here.

Provenance

The following attestation bundles were made for stapel_shop-0.2.18-py3-none-any.whl:

Publisher: publish.yml on usestapel/stapel-shop

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

2 files

0.2.33

2 files

0.2.32

2 files

0.2.31

2 files

0.2.30

2 files

0.2.29

2 files

0.2.28

2 files

0.2.27

2 files

0.2.26

2 files

0.2.25

2 files

0.2.24

2 files

0.2.22

2 files

0.2.21

2 files

0.2.20

2 files

0.2.19

2 files

This release

0.2.18 This release

2 files

0.2.17

2 files

0.2.16

2 files

0.2.15

2 files

0.2.14

2 files

0.2.12

2 files

0.2.11

2 files

0.2.10

2 files

0.2.9

2 files

0.2.8

2 files

0.2.7

2 files

0.2.6

2 files

0.2.5

2 files

0.2.4

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.5

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