Skip to main content

This package is to integrate Yalidine api easily.

Project description

Yalidine

Yalidine a Python library that implement Yalidine REST API.

alt text

Instaltion

pip install yalidine

Usage

Initialize client

from yalidine import YalidineClient

app_id = "APP-ID"
app_token = "APP-TOKEN"

client = YalidineClient(app_id, app_token)

print(client.get_parcels())

Check api limit

response = client.get_parcels()
limit = client.last_response_headers
# last_response_headers include api limit status from last request
print(limit)

Parcel

parcel = Parcel(
    order_id="test_parcel",
    firstname="firstname",
    ... # Fill Fields
)

# create parcel
response = client.create_parcel([parcel])

# update parcel
response = client.update_parcel(parcel_id=parcel_id, data=parcel)

# delete parcel
response = client.delete_parcel(parcel_id="parcel_id")

# Get parcel 
response = client.get_parcel(parcel_id="parcel_id")

# Get parcel list
response = client.get_parcels()

# Get parcel list using filter
from yalidine.entity import ParcelFilter
response = client.get_parcels(filter=ParcelFilter(page=1))

History

from yalidine.entity import HistoryFilter

responce = client.get_histories(filter=HistoryFilter(page_size=2))

Centers

from yalidine.entity import CenterFilter

responce = client.get_centers(filter=CenterFilter(page_size=2))

Wilayas

from yalidine.entity import WilayasFilter

responce = client.get_wilayas(filter=WilayasFilter(page_size=2))

Communes

from yalidine.entity import CommunesFilter

responce = client.get_communes(filter=CommunesFilter(page_size=2))

Delivery Fees

from yalidine.entity import DeliveryFeesFilter

responce = client.get_delivery_fees(filter=DeliveryFeesFilter(page_size=2))

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

yalidine-0.0.3.tar.gz (18.3 kB view details)

Uploaded Source

Built Distribution

yalidine-0.0.3-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file yalidine-0.0.3.tar.gz.

File metadata

  • Download URL: yalidine-0.0.3.tar.gz
  • Upload date:
  • Size: 18.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for yalidine-0.0.3.tar.gz
Algorithm Hash digest
SHA256 3c59bbcdcdb35116e509524dab0ef26dfc2a4f1df43c931cf024e0379c8f2708
MD5 9935b896b5ebacc077cab9b31c862061
BLAKE2b-256 2fccc79d204bd1b2182b5afd7c30219a8ac978e9ed9fe0fa4c688384e94d306e

See more details on using hashes here.

File details

Details for the file yalidine-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: yalidine-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for yalidine-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 95b2c9fb32dea44e12ffde2fb6e1ee0986dc54148ac1f7613b3018ad6e113dd6
MD5 3f7a3b3f84a06ccd3b4c105c0f7a58a7
BLAKE2b-256 010c14e060dd23201db1b19c8287a501600a7f1f31b420eeae147e324d746f47

See more details on using hashes here.

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