Skip to content

A python module to interact with the api of the popular agent pandabuy

Notifications You must be signed in to change notification settings

Galbaninoh/pandalib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pandalib

A python module to get informations from the api of the popular agent Pandabuy

Installation

Install the package using pip

  pip install pandalib

Since Pandabuy requires login for basically every api request you will need your pandabuy bearer token and your userid

Get your bearer token and user id

You can get your bearer token from the headers of any api request

Imgur Image

You can get your user id from the profile info

Imgur Image

Usage/Examples

Get an item info

from pandalib import pandalib, pandautilities

lib = pandalib("my bearer token", "my user id")

item = lib.get_item("https://item.taobao.com/item.htm?id=634959757581")

print(item)

Get your account balance

from pandalib import pandalib, pandautilities

lib = pandalib("my bearer token", "my user id")

balance = lib.get_balance()

print(balance)

Get your account info

from pandalib import pandalib, pandautilities

lib = pandalib("my bearer token", "my user id")

info = lib.get_user_info()

print(info)

Get your account cart

from pandalib import pandalib, pandautilities

lib = pandalib("my bearer token", "my user id")

cart = lib.get_cart()

print(cart)

Pandautilities

You can use pandautilities to estimate the shipping prices and convert cny to usd

Convert CNY to USD

from pandalib import pandalib, pandautilities

utilities = pandautilities("my bearer token", "my user id")

usd = utilities.cny_to_usd(230)

print(usd)

Estimate shipping prices

To estimate the shipping prices you can only input the weight or you can also input width, hight, length

from pandalib import pandalib, pandautilities

utilities = pandautilities("my bearer token", "my user id")

shipping_prices = utilities.estimate(weight=1200, length=30, hight=30, width = 30)

print(shipping_prices)

About

A python module to interact with the api of the popular agent pandabuy

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages