Metadata-Version: 2.4
Name: ecommerce-api-wrapper
Version: 0.0.4
Summary: E-commerce Python API Wrapper SDK.
Home-page: https://github.com/fuongz/ecommerce-api-wrapper
Author: fuongz
Author-email: hi@phuongphung.com
License: MIT
Project-URL: Bug Reports, https://github.com/fuongz/ecommerce-api-wrapper/issues
Project-URL: Source, https://github.com/fuongz/ecommerce-api-wrapper
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Python: >=3.8, <4
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: marshmallow==4.0.0
Requires-Dist: requests==2.32.3
Requires-Dist: tqdm==4.67.1
Requires-Dist: urllib3==2.4.0
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: license-file
Dynamic: project-url
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# Ecommerce API Wrapper - Python SDK

![Codecov](https://img.shields.io/codecov/c/gh/fuongz/ecommerce-api-wrapper?style=for-the-badge&token=1WV304VPMZ)
![PyPI - Version](https://img.shields.io/pypi/v/ecommerce-api-wrapper?style=for-the-badge)

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

## E-commerce APIs

- [Tokopedia](https://www.tokopedia.com/) - Indonesian e-commerce company
- [Lazada](https://www.lazada.com/)

## Libraries used

This project uses the following libraries:

- [requests](https://requests.readthedocs.io/en/master/) for making HTTP requests
- [marshmallow](https://marshmallow.readthedocs.io/en/stable/) for serializing and deserializing JSON data
- [urllib3](https://urllib3.readthedocs.io/en/latest/) for making secure HTTP requests
- [tqdm](https://tqdm.github.io/) for displaying progress bars

## Installation

You can install the package directly from PyPI using pip:

```bash
pip install ecommerce_api_wrapper
```

## Usage

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

```python
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

```text
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

- This project is licensed under the [MIT License](./LICENSE). See the [LICENSE](./LICENSE) file for details.
