pricestf_py 0.1.2

Last updated:

0 purchases

pricestf_py 0.1.2 Image
pricestf_py 0.1.2 Images
Add to Cart

Description:

pricestf py 0.1.2

Prices.tf API
pricestf_py is a library to get Team Fortress 2 items' prices from prices.tf API.
Prices can be queried both by items' SKUs or names: to get prices from item names a Steam API key is required.
Installation
pip3 install pricestf_py

If you are planning to get the items' prices using their names, after installing the package run:
from pricestf_py import TF2Items

TF2Items.save_item_ids(api_key='your-steam-api-key')

This method will download the list of item IDs which are necessary to generate the items' SKUs.
Use it also to update the items list (e.g. when new items are added to Team Fortress 2).
Examples
from pricestf_py import PricesTF

# Get token from prices.tf API
ptf = PricesTF()

# get item prices from its name
response = ptf.price_by_name("Rump-o'-Lantern", "Unique", craftable=False, australium=False, killstreak=0)
print(response)

# get item price from its SKU
response = ptf.price_by_sku(869, 6, craftable=False, australium=False, killstreak=0)
print(response)

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.