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
✅ City / Zone / Area lookup
✅ Delivery charge estimation
✅ Store information retrieval
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()
cities = client.get_city_list()
zones = client.get_zone_list(city_id=1)
areas = client.get_area_list(zone_id=5)
charge = client.get_delivery_charge(city_id=1, zone_id=5)
stores = client.get_stores()
Available Methods
Method Description
get_city_list() # Retrieve available cities
get_zone_list(city_id) # Retrieve zones within a city
get_area_list(zone_id) # Retrieve areas within a zone
get_delivery_charge(city_id, zone_id) # Get delivery charge estimation
get_stores() # Retrieve Pathao store information
Error Handling
Missing credentials - ValueError
Missing method parameters - Exception
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.0.0.tar.gz.
File metadata
- Download URL: pathao_api-1.0.0.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
457db35ce5d7e3457bbd45a19310a25f59ec4b7712aeedde8f9cfa34f6d8a741
|
|
| MD5 |
f54e2ed4795b31b71483e57a1ffedf96
|
|
| BLAKE2b-256 |
464a504bbde4f5b0f06b14debbcbe8327dabfa87719c7fb029102901bae09380
|
File details
Details for the file pathao_api-1.0.0-py3-none-any.whl.
File metadata
- Download URL: pathao_api-1.0.0-py3-none-any.whl
- Upload date:
- Size: 6.0 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 |
deb68d3f1a91a099406acbda67fd1b21096e17e0b05cd65f7a923a42a3f59b1d
|
|
| MD5 |
6bd4def39f30d2fbcbb340e47b86291b
|
|
| BLAKE2b-256 |
427cef32839f59c4fe4a32274bd942c9af894354f65d6f0fa2f8093bba940c0c
|