E-commerce Python API Wrapper SDK.
Project description
Ecommerce API Wrapper - Python SDK
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_wrapperdirectory 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
schemasfolders. src/ecommerce_api_wrapper/__init__.pyallows importing the package.testscontains test cases.
License
- This project is licensed under the MIT License. See the LICENSE file for details.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a69e7780086f3aeb0e75394b0586cc2e615af2dfd716c66874e9de367e207bbb
|
|
| MD5 |
77bbe94259bf0928024af36865806cc2
|
|
| BLAKE2b-256 |
9d964c831550a4b8da1ddf23348e0a7afd84a2553214ee6ccb0462cf8497fd75
|
File details
Details for the file ecommerce_api_wrapper-0.0.4-py3-none-any.whl.
File metadata
- Download URL: ecommerce_api_wrapper-0.0.4-py3-none-any.whl
- Upload date:
- Size: 20.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.23
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7e24fca76ea33935ccfe998e669d6b2dd1a43ea546508fb9f8ba15dab3795f9f
|
|
| MD5 |
33c97a0c6fbae79d27d254a6f95e116d
|
|
| BLAKE2b-256 |
4aa431159ac2d8c8736fd9ccf2fd6e2a132e368b929f1cf356af408ad46a7abd
|