Unofficial Pathao API client for Python
Project description
PathaoAPI - Unofficial Python Wrapper for Pathao Merchant API
pathao-api is a lightweight Python SDK that allows developers to interact with Pathao's Merchant API, providing utilities for:
✅ Authentication / Reauthentication
✅ City / Zone / Area lookup
✅ Delivery charge estimation
✅ Store information retrieval
✅ Create Order
Installation
pip install pathao-api
Configuration
You can configure credentials via a .env file or pass them directly during initialization.
✅ Option 1: Using .env
PATHAO_BASE_URL=https://api.pathao.com
PATHAO_STORE_ID=12345
PATHAO_CLIENT_ID=your_client_id
PATHAO_CLIENT_SECRET=your_client_secret
PATHAO_USERNAME=merchant@you.com
PATHAO_PASSWORD=yourpassword
✅ Option 2: Initialize with Arguments
from pathao_api import PathaoAPI
client = PathaoAPI(
base_url="https://api.pathao.com",
store_id="12345",
client_id="your_client_id",
client_secret="your_client_secret",
username="merchant@you.com",
password="yourpassword"
)
Usage
from pathao_api import PathaoAPI
client = PathaoAPI()
Then you can call the methods using the client with necessery parameters.
Available Methods
cities = client.get_city_list()
zones = client.get_zone_list(city_id:int)
areas = client.get_area_list(zone_id:int)
charge = client.get_delivery_charge(city_id:int, zone_id:int)
stores = client.get_stores()
order = client.create_order(order_id: str, recipient_name: str, recipient_phone: str, recipient_address: str, item_quantity: int, amount_to_collect: int, delivery_type: int = 48, item_type: int = 2, special_instruction: str = "", item_weight: float = 0.5, item_description: str = '')
The return values are same as pathao's official docs
Contributing
Contributions are welcome! Submit an issue or PR.
License
MIT License.
⭐ If you find this package helpful, consider giving a star!
Project details
Release history Release notifications | RSS feed
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 pathao_api-1.2.0.tar.gz.
File metadata
- Download URL: pathao_api-1.2.0.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
79b005acbb0472e98d4772f52a6e5abb5663e7aeb1a46c7c9750901b5e088555
|
|
| MD5 |
9754429142f21a8221bab30285f3fd1a
|
|
| BLAKE2b-256 |
6e640e2016540b821b915a8864918fe331ba0cb296e73f0957d5fa5cd2643f9b
|
File details
Details for the file pathao_api-1.2.0-py3-none-any.whl.
File metadata
- Download URL: pathao_api-1.2.0-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e47fa76be25a0c3858ead64839d7a6e8d835c92ef01256d3189dd590a0b2dd05
|
|
| MD5 |
87ebae863197950e5cc57ed413886c86
|
|
| BLAKE2b-256 |
b13452e93ec97785505103cc4715a438cbdb025e1845d5d2b2185bd29ca55b20
|