Skip to content

Commit c6d1708

Browse files
authored
Merge pull request #17 from offish/v2.3.0
v2.3.0
2 parents 3d62c07 + 0896afb commit c6d1708

39 files changed

+1157
-1394
lines changed

.flake8

Lines changed: 0 additions & 3 deletions
This file was deleted.

.gitignore

Lines changed: 174 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,174 @@
1-
.vscode
2-
__pycache__
3-
jsons
4-
config.py
5-
_build
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
share/python-wheels/
24+
*.egg-info/
25+
.installed.cfg
26+
*.egg
27+
MANIFEST
28+
29+
# PyInstaller
30+
# Usually these files are written by a python script from a template
31+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
32+
*.manifest
33+
*.spec
34+
35+
# Installer logs
36+
pip-log.txt
37+
pip-delete-this-directory.txt
38+
39+
# Unit test / coverage reports
40+
htmlcov/
41+
.tox/
42+
.nox/
43+
.coverage
44+
.coverage.*
45+
.cache
46+
nosetests.xml
47+
coverage.xml
48+
*.cover
49+
*.py,cover
50+
.hypothesis/
51+
.pytest_cache/
52+
cover/
53+
54+
# Translations
55+
*.mo
56+
*.pot
57+
58+
# Django stuff:
59+
*.log
60+
local_settings.py
61+
db.sqlite3
62+
db.sqlite3-journal
63+
64+
# Flask stuff:
65+
instance/
66+
.webassets-cache
67+
68+
# Scrapy stuff:
69+
.scrapy
70+
71+
# Sphinx documentation
72+
docs/_build/
73+
74+
# PyBuilder
75+
.pybuilder/
76+
target/
77+
78+
# Jupyter Notebook
79+
.ipynb_checkpoints
80+
81+
# IPython
82+
profile_default/
83+
ipython_config.py
84+
85+
# pyenv
86+
# For a library or package, you might want to ignore these files since the code is
87+
# intended to run in multiple environments; otherwise, check them in:
88+
# .python-version
89+
90+
# pipenv
91+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
93+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
94+
# install all needed dependencies.
95+
#Pipfile.lock
96+
97+
# UV
98+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
99+
# This is especially recommended for binary packages to ensure reproducibility, and is more
100+
# commonly ignored for libraries.
101+
#uv.lock
102+
103+
# poetry
104+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
105+
# This is especially recommended for binary packages to ensure reproducibility, and is more
106+
# commonly ignored for libraries.
107+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
108+
#poetry.lock
109+
110+
# pdm
111+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
112+
#pdm.lock
113+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
114+
# in version control.
115+
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
116+
.pdm.toml
117+
.pdm-python
118+
.pdm-build/
119+
120+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
121+
__pypackages__/
122+
123+
# Celery stuff
124+
celerybeat-schedule
125+
celerybeat.pid
126+
127+
# SageMath parsed files
128+
*.sage.py
129+
130+
# Environments
131+
.env
132+
.venv
133+
env/
134+
venv/
135+
ENV/
136+
env.bak/
137+
venv.bak/
138+
139+
# Spyder project settings
140+
.spyderproject
141+
.spyproject
142+
143+
# Rope project settings
144+
.ropeproject
145+
146+
# mkdocs documentation
147+
/site
148+
149+
# mypy
150+
.mypy_cache/
151+
.dmypy.json
152+
dmypy.json
153+
154+
# Pyre type checker
155+
.pyre/
156+
157+
# pytype static type analyzer
158+
.pytype/
159+
160+
# Cython debug symbols
161+
cython_debug/
162+
163+
# PyCharm
164+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
165+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
166+
# and can be added to the global gitignore or merged into this file. For a more nuclear
167+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
168+
#.idea/
169+
170+
# Ruff stuff:
171+
.ruff_cache/
172+
173+
# PyPI configuration file
174+
.pypirc

.vscode/settings.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"editor.formatOnSave": true,
3+
"editor.defaultFormatter": "charliermarsh.ruff",
4+
"[python]": {
5+
"editor.codeActionsOnSave": {
6+
"source.organizeImports": "explicit"
7+
}
8+
}
9+
}

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2019-2024 offish
3+
Copyright (c) 2019-2025 offish
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.rst

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@ tf2-utils
44

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

1011
Donate
1112
------
1213

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

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

5556
.. code-block:: bash
5657
57-
pip install --upgrade tf2-utils tf2-sku tf2-data
58+
pip install --upgrade tf2-utils tf2-sku tf2-data bptf
5859
# or
59-
python -m pip install --upgrade tf2-utils tf2-sku tf2-data
60+
python -m pip install --upgrade tf2-utils tf2-sku tf2-data bptf
6061
6162
6263
Development
@@ -67,7 +68,7 @@ Testing
6768
.. code-block:: bash
6869
6970
# tf2-utils/
70-
python -m unittest
71+
pytest
7172
7273
Documentation
7374
~~~~~~~~~~~~~
@@ -85,7 +86,7 @@ License
8586
-------
8687
MIT License
8788

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

9091
Permission is hereby granted, free of charge, to any person obtaining a copy
9192
of this software and associated documentation files (the "Software"), to deal

conftest.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
from os import getenv
2+
3+
import pytest
4+
from dotenv import load_dotenv
5+
6+
assert load_dotenv()
7+
8+
MARKETPLACE_TF_API_KEY = getenv("MARKETPLACE_TF_API_KEY")
9+
BACKPACK_TF_TOKEN = getenv("BACKPACK_TF_TOKEN")
10+
11+
12+
@pytest.fixture
13+
def marketplace_tf_api_key() -> str:
14+
return MARKETPLACE_TF_API_KEY
15+
16+
17+
@pytest.fixture
18+
def backpack_tf_token() -> str:
19+
return BACKPACK_TF_TOKEN

docs/index.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,15 @@ Table of Contents
77
:maxdepth: 2
88

99

10-
pages/backpack_tf
1110
pages/currency
1211
pages/inventory
1312
pages/item
1413
pages/marketplace_tf
1514
pages/offer
1615
pages/prices_tf
16+
pages/prices_tf_websocket
1717
pages/schema
1818
pages/sku
19-
pages/sockets
2019
pages/utils
2120

2221

docs/pages/backpack_tf.rst

Lines changed: 0 additions & 12 deletions
This file was deleted.

docs/pages/prices_tf_websocket.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Sockets
2+
=======
3+
4+
PricesTF Example
5+
----------------
6+
7+
.. literalinclude:: ../usage/prices_tf_socket.py
8+
:language: python3
9+
10+
.. automodule:: src.tf2_utils.prices_tf_websocket
11+
:members:
12+
:undoc-members:

docs/pages/sockets.rst

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)