|
| 1 | +tf2-utils |
| 2 | +========= |
| 3 | + |
| 4 | +.. image:: https://img.shields.io/github/license/offish/tf2-utils.svg |
| 5 | + :target: https://github.com/offish/tf2-utils/blob/master/LICENSE |
| 6 | + :alt: License |
| 7 | + |
| 8 | +.. image:: https://img.shields.io/github/stars/offish/tf2-utils.svg |
| 9 | + :target: https://github.com/offish/tf2-utils/stargazers |
| 10 | + :alt: Stars |
| 11 | + |
| 12 | +.. image:: https://img.shields.io/github/issues/offish/tf2-utils.svg |
| 13 | + :target: https://github.com/offish/tf2-utils/issues |
| 14 | + :alt: Issues |
| 15 | + |
| 16 | +.. image:: https://img.shields.io/github/repo-size/offish/tf2-utils.svg |
| 17 | + :target: https://github.com/offish/tf2-utils |
| 18 | + :alt: Size |
| 19 | + |
| 20 | +.. image:: https://img.shields.io/discord/467040686982692865?color=7289da&label=Discord&logo=discord |
| 21 | + :target: https://discord.gg/t8nHSvA |
| 22 | + :alt: Discord |
| 23 | + |
| 24 | +.. image:: https://img.shields.io/badge/code%20style-black-000000.svg |
| 25 | + :target: https://github.com/psf/black |
| 26 | + :alt: Code style |
| 27 | + |
| 28 | +.. image:: https://img.shields.io/pypi/dm/tf2-utils |
| 29 | + :target: https://pypi.org/project/tf2-utils/ |
| 30 | + :alt: Downloads |
| 31 | + |
| 32 | +``tf2-utils`` is a collection of tools and utilities for TF2 trading. |
| 33 | +Use 3rd party inventory providers, SKUs formatting, interact with various APIs, websockets and more. |
| 34 | +``tf2-utils`` is built on top of `tf2-sku <https://github.com/offish/tf2-sku>`_ and `tf2-data <https://github.com/offish/tf2-data>`_. |
| 35 | +``tf2-utils`` is a key dependency of `tf2-express <https://github.com/offish/tf2-express>`_. |
| 36 | + |
| 37 | +Donate |
| 38 | +------ |
| 39 | + |
| 40 | +- BTC: ``bc1qntlxs7v76j0zpgkwm62f6z0spsvyezhcmsp0z2`` |
| 41 | +- `Steam Trade Offer <https://steamcommunity.com/tradeoffer/new/?partner=293059984&token=0-l_idZR>`_ |
| 42 | + |
| 43 | +You can reach me at `Steam <https://steamcommunity.com/id/confern>`_, |
| 44 | +my `Discord server <https://discord.gg/t8nHSvA>`_ |
| 45 | +or `Discord profile <https://discord.com/users/252183247843229696>`_. |
| 46 | + |
| 47 | +Features |
| 48 | +-------- |
| 49 | + |
| 50 | +- Built-in currency picking (metal + keys) for sending offers |
| 51 | +- Interact with BackpackTF's API |
| 52 | +- Interact with PricesTF's API |
| 53 | +- Get MarketplaceTF item prices and stocks |
| 54 | +- Get SKUs directly from inventories/offers |
| 55 | +- Convert names to SKUs and vice versa |
| 56 | +- Fetch inventories using 3rd party providers or your own (avoid being rate-limited) |
| 57 | +- Listen for Backpack.TF websocket events |
| 58 | +- Listen for Prices.TF websocket events |
| 59 | +- Get item properties (``is_craft_hat``, ``get_paint``, ``get_effect`` and more) |
| 60 | +- Fetch TF2 Schema data |
| 61 | +- Convert SKU/defindex to item image URL |
| 62 | +- Calculate scrap and refined prices |
| 63 | +- Convert SteamIDs |
| 64 | +- and more... |
| 65 | + |
| 66 | +Documentation |
| 67 | +------------- |
| 68 | +Documentation including usage and examples can be found `here <https://offish.github.io/tf2-utils/>`_. |
| 69 | + |
| 70 | +Installing |
| 71 | +---------- |
| 72 | + |
| 73 | +.. code-block:: bash |
| 74 | +
|
| 75 | + pip install tf2-utils |
| 76 | + # or |
| 77 | + python -m pip install tf2-utils |
| 78 | +
|
| 79 | +Updating |
| 80 | +~~~~~~~~ |
| 81 | + |
| 82 | +.. code-block:: bash |
| 83 | +
|
| 84 | + pip install --upgrade tf2-utils tf2-sku tf2-data |
| 85 | + # or |
| 86 | + python -m pip install --upgrade tf2-utils tf2-sku tf2-data |
| 87 | +
|
| 88 | +
|
| 89 | +Development |
| 90 | +----------- |
| 91 | + |
| 92 | +Testing |
| 93 | +~~~~~~~ |
| 94 | +.. code-block:: bash |
| 95 | +
|
| 96 | + # tf2-utils/ |
| 97 | + python -m unittest |
| 98 | +
|
| 99 | +Documentation |
| 100 | +~~~~~~~~~~~~~ |
| 101 | +.. code-block:: bash |
| 102 | +
|
| 103 | + # tf2-utils/docs/ |
| 104 | + pip install sphinx furo |
| 105 | + make clean # .\make.bat <command> on windows |
| 106 | + make html |
| 107 | +
|
| 108 | +When submitting a pull request, please make sure to run the tests (+ make new ones if applicable) |
| 109 | +and update the documentation. Run the code through ``black`` and ``flake8`` before submitting. |
| 110 | + |
| 111 | +License |
| 112 | +------- |
| 113 | +MIT License |
| 114 | + |
| 115 | +Copyright (c) 2019-2024 offish (`confern <https://steamcommunity.com/id/confern>`_) |
| 116 | + |
| 117 | +Permission is hereby granted, free of charge, to any person obtaining a copy |
| 118 | +of this software and associated documentation files (the "Software"), to deal |
| 119 | +in the Software without restriction, including without limitation the rights |
| 120 | +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 121 | +copies of the Software, and to permit persons to whom the Software is |
| 122 | +furnished to do so, subject to the following conditions: |
| 123 | + |
| 124 | +The above copyright notice and this permission notice shall be included in all |
| 125 | +copies or substantial portions of the Software. |
| 126 | + |
| 127 | +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 128 | +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 129 | +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 130 | +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 131 | +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 132 | +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
| 133 | +SOFTWARE. |
| 134 | + |
0 commit comments