Skip to main content

Python SDK for Pathao Courier Merchant API

Project description

Pathao Python SDK

Tests Code Quality PyPI version Python versions License: MIT Documentation

A comprehensive Python SDK for the Pathao Courier Merchant API. This package provides a clean, Pythonic interface to integrate Pathao's courier services into your Python applications.

Features

  • OAuth 2.0 authentication with automatic token refresh
  • Type hints throughout the codebase
  • Comprehensive input validation
  • Detailed error messages
  • Support for both Sandbox and Production environments
  • Batch operations support
  • Extensive documentation and examples

Installation

pip install pathao

Quick Start

from pathao import PathaoClient

# Initialize the client
client = PathaoClient(
    client_id="your_client_id",
    client_secret="your_client_secret",
    username="your_email",
    password="your_password",
    environment="sandbox"  # Use "production" for live
)

# Create an order
order = client.orders.create(
    store_id=1,
    recipient_name="John Doe",
    recipient_phone="01712345678",
    recipient_address="House 123, Road 4, Dhaka",
    delivery_type=48,  # Normal delivery
    item_type=2,  # Parcel
    item_quantity=1,
    item_weight=0.5,
    amount_to_collect=0
)

print(f"Order created: {order.consignment_id}")

Documentation

Requirements

  • Python 3.8 or higher
  • requests>=2.28.0
  • python-dotenv>=0.21.0

Development

# Clone the repository
git clone https://github.com/mojnomiya/pathao-python.git
cd pathao-python

# Install development dependencies
pip install -r requirements-dev.txt

# Run tests
pytest

# Format code
black pathao tests

# Type checking
mypy pathao

Contributing

We welcome contributions! Please see our Contributing Guidelines for details.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

Changelog

See CHANGELOG.md for a list of changes and releases.

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

pathao-0.1.3.tar.gz (33.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pathao-0.1.3-py3-none-any.whl (19.0 kB view details)

Uploaded Python 3

File details

Details for the file pathao-0.1.3.tar.gz.

File metadata

  • Download URL: pathao-0.1.3.tar.gz
  • Upload date:
  • Size: 33.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pathao-0.1.3.tar.gz
Algorithm Hash digest
SHA256 d01a45b8e5a4beeaad36aabe078a74e1319e71885a438af5ba4f6fb45526f817
MD5 8c1b0b6e33e725870de9611a4e5a4e15
BLAKE2b-256 1fd87b90fbc6c6cedf6c103fa8b090748f3320671cdc75f02d194ba0f16ce9e9

See more details on using hashes here.

File details

Details for the file pathao-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: pathao-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 19.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pathao-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e59a0b47090d25dde0bc3ec9092a0386829f3c4480aaddf195bf638bd7c7818d
MD5 701875d2ea1b46689a910d90d4ac8046
BLAKE2b-256 f7873dfc14ca7d22aabc6a682f99bfafb376c47d46e30685e6783753673f12f2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page