Skip to main content

Features

Features:

  • Products
    • products (multiple images + main image, title, description, etc.)
    • products categories (parent/child categories)
    • product dynamic stats
    • product comments
    • search for products/categories
    • filter for products in the category
  • Customers
    • wish lists
    • cart
    • compare lists
    • bonuses wallet
    • customer support request
  • Settings
    • taxes
    • currencies
  • Orders
    • orders
    • order reports (view and generation of pdf)
    • shipping
    • statuses of order / payment / shipment

Installation

  • Install library
pip install drf-shop-api
  • Add to installed apps

    INSTALLED_APPS = [
      ...
      'drf_shop_api'
    ]
    
  • Add api path to you root urls.py

   urlpatterns = [
    ...
    path("shop/", include("drf_shop_api.urls")),
]
  • Use create_shop_profile decorator on create_user method of your UserManager
from django.contrib.auth.base_user import BaseUserManager

from drf_shop_api.decorators import create_shop_profile


class UserManager(BaseUserManager):
    @create_shop_profile
    def create_user(self, email, password=None):
        if not email:
            raise ValueError("Enter the email")
        user = self.model(email=self.normalize_email(email))
        user.set_password(password)
        user.save(using=self._db)
        return user
  • Setup AUTH_USER_MODEL in settings.py

  • Run python manage.py makemigrations and python manage.py migrate (Due to optional Payment model from root project)

  • Optional settings:

    • DRF_SHOP_PAGE_SIZE on will be default 10
    • DRF_SHOP_PAYMENT_MODEL = "projects.payments.models.Payment"
    • DRF_SHOP_PAYMENT_STATUS_CHOICES = "project.payments.choices.PaymentStatus"
    • DRF_SHOP_BONUS_RATE = percentage value for each order that will go to bonus wallet

Dependencies

django
drf
drf-yasg 1.21.5
rest_framework_simplejwt
mixer
django-filter

TODO

  • Add DB indexes
  • Task for currency rate update
  • Review permissions

Metadata

Release files for drf-shop-api 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for drf-shop-api 0.0.3
File Size Uploaded Provenance Actions
drf_shop_api-0.0.3.tar.gz 20.4 kB Without provenance Details for drf_shop_api-0.0.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for drf-shop-api 0.0.3
File Interpreter ABI Platform Actions
drf_shop_api-0.0.3-py3-none-any.whl Python 3 none any Details for drf_shop_api-0.0.3-py3-none-any.whl

Total release size: 48.3 kB

Release files / drf_shop_api-0.0.3.tar.gz

Download URL drf_shop_api-0.0.3.tar.gz
Size 20.4 kB
Tags Source
SHA-256 checksum
How to use checksums
8e736687e9d29e61597698e3fe54fd428d33e580477f164a2765457be54f09e0
BLAKE2b-256 checksum
How to use checksums
35475413ea2375cce94784d63b7ebbcc8fb0f5421fe9bcae32cc815be3f0f525
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.3.1 CPython/3.11.0 Darwin/22.4.0

Release files / drf_shop_api-0.0.3-py3-none-any.whl

Download URL drf_shop_api-0.0.3-py3-none-any.whl
Size 27.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
288099bccfcac1c0d872b41354da94e0581c85ad8e55c422152e5f1e555cfbcf
BLAKE2b-256 checksum
How to use checksums
9ff822ab24112473efde55d85fea4225fe7727c5fffebefb59a7fd2d454242e4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.3.1 CPython/3.11.0 Darwin/22.4.0

Security for drf-shop-api 0.0.3

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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