A python module to interact with the api of the popular agent pandabuy
Project description
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
You can get your user id from the profile info
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)
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
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 pandalib-0.2.3.tar.gz.
File metadata
- Download URL: pandalib-0.2.3.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e91b0c8c5c2eb75592cbef63870e012e87f1b82856ab333630ca9b5c6e6dfc15
|
|
| MD5 |
2f91fe08c6e27b9f26c12bdd37b07031
|
|
| BLAKE2b-256 |
1e8557670f37e419e087d2e3d468b9e643b10e2389c21275eb930747f6cd6e04
|
File details
Details for the file pandalib-0.2.3-py3-none-any.whl.
File metadata
- Download URL: pandalib-0.2.3-py3-none-any.whl
- Upload date:
- Size: 3.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
030c4bc79629d23b5e75eb5537aef007f15081c7718ba179c80dbfed7e8bcd9f
|
|
| MD5 |
faea50b8f8c066360c4c5a6953be91fd
|
|
| BLAKE2b-256 |
7a62988666d6e800b2967fc682de67d0bf6dc0db8a8a1332e24ebd12f576b33e
|