flexcommerce-discounts
Coupons, automatic promotions and flash sales — with usage limits that hold under heavy traffic.
Part of FlexCommerce — a complete, modular e-commerce and marketplace backend for Django + DRF, built for Nigeria and Africa. Every app is optional.
Features
- Percentage (with cap), fixed, free shipping and buy-X-get-Y coupons
- Product, category, exclusion and vendor restrictions; minimum spend; first order only
- Global and per-customer (incl. guest email) limits enforced atomically at checkout
- Automatic code-less promotions (best one wins)
- Flash sales with per-product sale prices and "only N left" caps
Install
pip install flexcommerce-discounts
INSTALLED_APPS = [..., "rest_framework", "flexcommerce_core", "flexcommerce_discounts"]
urlpatterns = [path("api/", include("flexcommerce_core.urls"))]
python manage.py migrate
Example: POST /api/cart/coupon/
Documentation
Requires Python 3.10+, Django 4.2+, Django REST framework 3.14+. MIT licensed.
Metadata
Release files for flexcommerce-discounts 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| flexcommerce_discounts-1.0.0.tar.gz | 16.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| flexcommerce_discounts-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 36.7 kB
Release files / flexcommerce_discounts-1.0.0.tar.gz
| Download URL | flexcommerce_discounts-1.0.0.tar.gz |
|---|---|
| Size | 16.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
be825a51d0474900d3a1707b776777d6174c7044957d3a75cd6c532643d923a2
|
|
BLAKE2b-256 checksum How to use checksums |
f2ad3cc6c68b5ba5d8c24b56a312ef2cade3bd22e2a5b671d56b36a757d26ae4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.
Transparency logRelease files / flexcommerce_discounts-1.0.0-py3-none-any.whl
| Download URL | flexcommerce_discounts-1.0.0-py3-none-any.whl |
|---|---|
| Size | 19.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8149b5e8d439e28dcae749d2f423e4ef6f395e76849269f2d382cad820d88887
|
|
BLAKE2b-256 checksum How to use checksums |
6be134d2861397944fb0cfdbcaa0eabc4e955a5278a85884cf1285e0672540e7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.
Transparency log