Skip to main content

A Python SDK for integrating with the BuyWithDigikala service.

Project description

BuyWithDigikala (BWDK) Python SDK

A Python SDK for integrating with the BuyWithDigikala (خرید با دیجی‌کالا) service.

Installation

pip install bwdk-sdk

Usage:

    from bwdk_sdk import BWDKClient, OrderItem, ItemOption

    client = BWDKClient(api_key="your_api_key_here")

    # Create an order
    items = [
        OrderItem(
            name="گوشی موبایل اپل iPhone 17 Pro Max",
            primary_amount=140000,
            amount=120000,
            count=1,
            discount_amount=22500,
            tax_amount=0,
            image_link="https://example.com/img.jpg",
            options=[
                ItemOption(type_name="color", name="قرمز", value="#FF0000", is_color=True),
                ItemOption(type_name="size", name="سایز", value="xl", is_color=False),
            ]
        )
    ]

    response = client.create_order(
        merchant_unique_id="unique-id-123",
        merchant_order_id="ORDER-001",
        main_amount=180000,
        final_amount=165000,
        discount_amount=30000,
        tax_amount=15000,
        callback_url="https://yourstore.com/bwdk/callback/",
        reservation_expired_at=1761120855,
        items=items,
    )

    print(response.order_start_url)

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

bwdk_sdk-0.1.0.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

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

bwdk_sdk-0.1.0-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file bwdk_sdk-0.1.0.tar.gz.

File metadata

  • Download URL: bwdk_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for bwdk_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 bd9237848507402270e2739cfd3385e49e4b6893e97012b70ccc2588d0a98c88
MD5 c53cb2aa036dba4db21a658f74f98656
BLAKE2b-256 80c7626e64f07d9f238560940ac499b916759386fb7d42f3dd693d96e1dd9793

See more details on using hashes here.

Provenance

The following attestation bundles were made for bwdk_sdk-0.1.0.tar.gz:

Publisher: publish.yml on digifyengteam/BuyWithDigikala-SDK-Python

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

File details

Details for the file bwdk_sdk-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: bwdk_sdk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for bwdk_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 95d3da8815818750179c368ff1ea5e80563f400a5cb0092ef94a50bc68aee6d3
MD5 ad7f47984488ebbd71dc860f2cf68758
BLAKE2b-256 1f2327267d2328954161ba7a631eb9fecae9292723bc1be34fb21b287a671bb2

See more details on using hashes here.

Provenance

The following attestation bundles were made for bwdk_sdk-0.1.0-py3-none-any.whl:

Publisher: publish.yml on digifyengteam/BuyWithDigikala-SDK-Python

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