Skip to main content

RajaOngkir API Wrapper

Project description

Raja Ongkir API

API Documentation

Raja Ongkir is a RESTful API that provides the following services:

  • Object-Oriented Interface - The API is implemented in object-oriented style.

  • Simple and Easy to Use - The API is easy to use and simple to implement.

  • Province: Get all province data

  • Province Detail: Get province detail data

  • City: Get all city data

  • Find City: Get city data by province id

  • Cost: Get all cost data

  • ETD: Get all etd data

  • Varian Account Type: Get all varian account type data


Installation

    pip install rajaongkir-py

Usage

    from rajaongkir import Client

    # Create a client object
    client = Client(auth='YOUR_API_KEY')
    
    # Get all province data
    provinces = client.provinces.list()

    # Get province detail data
    province = client.provinces.query(province_id=1)

    # Get all city data
    cities = client.cities.list()

    # Get city data by province id
    cities = client.cities.query(province_id=1)

    # Get ciry data by city id and province id
    city = client.cities.query(city_id=1, province_id=1)

    # Get calculate cost data
    cost = client.costs.calculate(origin=501, destination=114, weight=1000, courier='jne')
    
    # print cost data
    print(cost)

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

rajaongkir-py-1.0.1.tar.gz (5.6 kB view hashes)

Uploaded Source

Built Distribution

rajaongkir_py-1.0.1-py3-none-any.whl (6.8 kB view hashes)

Uploaded Python 3

Supported by

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