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.
Metadata
Release files for ecommerce-api-wrapper 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ecommerce_api_wrapper-0.0.4.tar.gz | 15.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ecommerce_api_wrapper-0.0.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 35.9 kB
Release files / ecommerce_api_wrapper-0.0.4.tar.gz
| Download URL | ecommerce_api_wrapper-0.0.4.tar.gz |
|---|---|
| Size | 15.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a69e7780086f3aeb0e75394b0586cc2e615af2dfd716c66874e9de367e207bbb
|
|
BLAKE2b-256 checksum How to use checksums |
9d964c831550a4b8da1ddf23348e0a7afd84a2553214ee6ccb0462cf8497fd75
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.23
|
Release files / ecommerce_api_wrapper-0.0.4-py3-none-any.whl
| Download URL | ecommerce_api_wrapper-0.0.4-py3-none-any.whl |
|---|---|
| Size | 20.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7e24fca76ea33935ccfe998e669d6b2dd1a43ea546508fb9f8ba15dab3795f9f
|
|
BLAKE2b-256 checksum How to use checksums |
4aa431159ac2d8c8736fd9ccf2fd6e2a132e368b929f1cf356af408ad46a7abd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.23
|