Skip to main content

pricestf_py is a library to get Team Fortress 2 items' prices from prices.tf API.

Project description

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)

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

pricestf_py-0.1.2.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pricestf_py-0.1.2-py2.py3-none-any.whl (4.7 kB view details)

Uploaded Python 2Python 3

File details

Details for the file pricestf_py-0.1.2.tar.gz.

File metadata

  • Download URL: pricestf_py-0.1.2.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.28.1

File hashes

Hashes for pricestf_py-0.1.2.tar.gz
Algorithm Hash digest
SHA256 1a4eaca257b5c17ee622825cb39a69830d154771b138aae978c22b928b13aec0
MD5 2b941b5aaf2294176bc3f06d7993394c
BLAKE2b-256 3146271a6e8893a5d0560a074d5d1944fdf569ea29b82e704879ea885d9fb78a

See more details on using hashes here.

File details

Details for the file pricestf_py-0.1.2-py2.py3-none-any.whl.

File metadata

  • Download URL: pricestf_py-0.1.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.28.1

File hashes

Hashes for pricestf_py-0.1.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 257a79975235148ccc476894e731f36d6a77774c960c208d4fe4a2e093548a1f
MD5 2e056b6e9be16c1fae6e71025ac249c5
BLAKE2b-256 1edeae6e5b161fbef22b23c2178313e25de4835d10236b18f326dd617db2af05

See more details on using hashes here.

Supported by

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