Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .flake8

This file was deleted.

179 changes: 174 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,174 @@
.vscode
__pycache__
jsons
config.py
_build
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# UV
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
#uv.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
.pdm.toml
.pdm-python
.pdm-build/

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

# Ruff stuff:
.ruff_cache/

# PyPI configuration file
.pypirc
9 changes: 9 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"editor.formatOnSave": true,
"editor.defaultFormatter": "charliermarsh.ruff",
"[python]": {
"editor.codeActionsOnSave": {
"source.organizeImports": "explicit"
}
}
}
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019-2024 offish
Copyright (c) 2019-2025 offish

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
13 changes: 7 additions & 6 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ tf2-utils

``tf2-utils`` is a collection of tools and utilities for TF2 trading.
Use 3rd party inventory providers, SKUs formatting, interact with various APIs, websockets and more.
``tf2-utils`` is built on top of `tf2-sku <https://github.com/offish/tf2-sku>`_ and `tf2-data <https://github.com/offish/tf2-data>`_.
``tf2-utils`` is built on top of `tf2-sku <https://github.com/offish/tf2-sku>`_, `tf2-data <https://github.com/offish/tf2-data>`_
and `backpack-tf <https://github.com/offish/backpack-tf>`_.
``tf2-utils`` is a key dependency of `tf2-express <https://github.com/offish/tf2-express>`_.

Donate
------

- BTC: ``bc1qntlxs7v76j0zpgkwm62f6z0spsvyezhcmsp0z2``
- BTC: ``bc1q9gmh5x2g9s0pw3282a5ypr6ms8qvuxh3fd7afh``
- `Steam Trade Offer <https://steamcommunity.com/tradeoffer/new/?partner=293059984&token=0-l_idZR>`_

You can reach me at `Steam <https://steamcommunity.com/id/confern>`_,
Expand Down Expand Up @@ -54,9 +55,9 @@ Updating

.. code-block:: bash

pip install --upgrade tf2-utils tf2-sku tf2-data
pip install --upgrade tf2-utils tf2-sku tf2-data bptf
# or
python -m pip install --upgrade tf2-utils tf2-sku tf2-data
python -m pip install --upgrade tf2-utils tf2-sku tf2-data bptf


Development
Expand All @@ -67,7 +68,7 @@ Testing
.. code-block:: bash

# tf2-utils/
python -m unittest
pytest

Documentation
~~~~~~~~~~~~~
Expand All @@ -85,7 +86,7 @@ License
-------
MIT License

Copyright (c) 2019-2024 offish (`confern <https://steamcommunity.com/id/confern>`_)
Copyright (c) 2019-2025 offish (`confern <https://steamcommunity.com/id/confern>`_)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
19 changes: 19 additions & 0 deletions conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
from os import getenv

import pytest
from dotenv import load_dotenv

assert load_dotenv()

MARKETPLACE_TF_API_KEY = getenv("MARKETPLACE_TF_API_KEY")
BACKPACK_TF_TOKEN = getenv("BACKPACK_TF_TOKEN")


@pytest.fixture
def marketplace_tf_api_key() -> str:
return MARKETPLACE_TF_API_KEY


@pytest.fixture
def backpack_tf_token() -> str:
return BACKPACK_TF_TOKEN
3 changes: 1 addition & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,15 @@ Table of Contents
:maxdepth: 2


pages/backpack_tf
pages/currency
pages/inventory
pages/item
pages/marketplace_tf
pages/offer
pages/prices_tf
pages/prices_tf_websocket
pages/schema
pages/sku
pages/sockets
pages/utils


Expand Down
12 changes: 0 additions & 12 deletions docs/pages/backpack_tf.rst

This file was deleted.

12 changes: 12 additions & 0 deletions docs/pages/prices_tf_websocket.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Sockets
=======

PricesTF Example
----------------

.. literalinclude:: ../usage/prices_tf_socket.py
:language: python3

.. automodule:: src.tf2_utils.prices_tf_websocket
:members:
:undoc-members:
18 changes: 0 additions & 18 deletions docs/pages/sockets.rst

This file was deleted.

33 changes: 0 additions & 33 deletions docs/usage/backpack_tf.py

This file was deleted.

16 changes: 0 additions & 16 deletions docs/usage/backpack_tf_socket.py

This file was deleted.

Loading