TF2 API
A simple tf2 API!
Example:
from tf2 import TF2
import getpass4
tf2 = TF2(str(getpass4.getpass('Enter Steam Web API Key: ' , '*')), 123456789012345) # the getpass4 thing is a password thing. You can put a string with the api key there.
scoutk = tf2.get_kills_as_class('Scout')
heavyk = tf2.get_kills_as_class('Heavy')
pyrok = tf2.get_kills_as_class('Pyro')
spyk = tf2.get_kills_as_class('Spy')
medick = tf2.get_kills_as_class('Medic')
sniperk = tf2.get_kills_as_class('Sniper')
soldierk = tf2.get_kills_as_class('Soldier')
engineerk = tf2.get_kills_as_class('Engineer')
demomank = tf2.get_kills_as_class('Demoman')
total_kills = scoutk + heavyk + pyrok + spyk + medick + sniperk + soldierk + engineerk + demomank
print(f"Total Kills (All Classes): {total_kills}")
print("--------------------------------------")
scoutp = tf2.get_playtime_as_class('Scout')
heavyp = tf2.get_playtime_as_class('Heavy')
pyrop = tf2.get_playtime_as_class('Pyro')
spyp = tf2.get_playtime_as_class('Spy')
medicp = tf2.get_playtime_as_class('Medic')
sniperp = tf2.get_playtime_as_class('Sniper')
soldierp = tf2.get_playtime_as_class('Soldier')
engineerp = tf2.get_playtime_as_class('Engineer')
demomanp = tf2.get_playtime_as_class('Demoman')
print(f"""
Scout playtime: {scoutp}
Heavy Playtime: {heavyp}
Pyro Playtime: {pyrop}
Spy Playtime: {spyp}
Medic Playtime: {medicp}
Sniper Playtime: {sniperp}
Soldier Playtime: {soldierp}
Engineer Playtime: {engineerp}
Demoman Playtime: {demomanp}
""")
print("--------------------------------------")
print(f"""
PyPi Page: {tf2.pypi_page}
Github Page: {tf2.github_page}
""")
Metadata
Release files for tf2-api 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tf2_api-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for tf2_api-0.0.1-py3-none-any.whl |
Release files / tf2_api-0.0.1-py3-none-any.whl
| Download URL | tf2_api-0.0.1-py3-none-any.whl |
|---|---|
| Size | 3.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3fb4fd8b5a309d8fd4d2a010b19858d4a9b5c1e038b1b64dcba7563796491a41
|
|
BLAKE2b-256 checksum How to use checksums |
ee94bd974add2a9d539c202ad2f4201198e936562bf4d569bebf266c5e8d1e36
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.2
|
Security for tf2-api 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.