Skip to main content

E-commerce Python API Wrapper SDK.

Project description

Ecommerce API Wrapper - Python SDK

Codecov PyPI - Version

This is an unofficial Python SDK for Popular Ecommerce (Tokopedia, Lazada). The project is still under development.

E-commerce APIs

Libraries used

This project uses the following libraries:

  • requests for making HTTP requests
  • marshmallow for serializing and deserializing JSON data
  • urllib3 for making secure HTTP requests
  • tqdm for displaying progress bars

Installation

You can install the package directly from PyPI using pip:

pip install ecommerce_api_wrapper

Usage

Here is a simple example of how to use the package:

from ecommerce_api_wrapper import EcommerceApiWrapper

if __name__ == "__main__":
    crawler = EcommerceApiWrapper(
        ecom_type="tokopedia",
    )
    response = crawler.search_products(["samsung"])
    print(response)

    # RESULT:
    #

Development

Project Structure

ecommerce_api_wrapper/
├── src/
│   ├── ecommerce_api_wrapper/
│   │   ├── __init__.py
│   │   ├── __version__.py
│   │   ├── ecommerce_api_wrapper.py
│   │   ├── providers/
│   │   │   ├── __init__.py
│   │   │   ├── lazada_api_wrapper/
│   │   │   │   ├── __init__.py
│   │   │   │   ├── constants.py
│   │   │   │   ├── lazada.py
│   │   │   │   └── schemas/
│   │   │   └── tokopedia_api_wrapper/
│   │   │       ├── __init__.py
│   │   │       ├── constants.py
│   │   │       ├── tokopedia.py
│   │   │       ├── schemas/
│   │   │       └── utils/
│   │   └── utils/
│   │       ├── __init__.py
│   │       ├── faker.py
│   │       └── transform.py
├── tests/
│   └── unit_test.py
├── pyproject.toml
├── README.md
└── LICENSE
  • The src/ecommerce_api_wrapper directory contains the package code.
  • Each major provider (Lazada, Tokopedia) resides in its own subpackage under src/ecommerce_api_wrapper/providers.
  • Utility modules are grouped under utils.
  • Schemas for each provider are organized in their respective schemas folders.
  • src/ecommerce_api_wrapper/__init__.py allows importing the package.
  • tests contains test cases.

License

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

ecommerce_api_wrapper-0.0.4.tar.gz (15.8 kB view details)

Uploaded Source

Built Distribution

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

ecommerce_api_wrapper-0.0.4-py3-none-any.whl (20.1 kB view details)

Uploaded Python 3

File details

Details for the file ecommerce_api_wrapper-0.0.4.tar.gz.

File metadata

  • Download URL: ecommerce_api_wrapper-0.0.4.tar.gz
  • Upload date:
  • Size: 15.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.23

File hashes

Hashes for ecommerce_api_wrapper-0.0.4.tar.gz
Algorithm Hash digest
SHA256 a69e7780086f3aeb0e75394b0586cc2e615af2dfd716c66874e9de367e207bbb
MD5 77bbe94259bf0928024af36865806cc2
BLAKE2b-256 9d964c831550a4b8da1ddf23348e0a7afd84a2553214ee6ccb0462cf8497fd75

See more details on using hashes here.

File details

Details for the file ecommerce_api_wrapper-0.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for ecommerce_api_wrapper-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 7e24fca76ea33935ccfe998e669d6b2dd1a43ea546508fb9f8ba15dab3795f9f
MD5 33c97a0c6fbae79d27d254a6f95e116d
BLAKE2b-256 4aa431159ac2d8c8736fd9ccf2fd6e2a132e368b929f1cf356af408ad46a7abd

See more details on using hashes here.

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