Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: offish/tf2-data
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.0.7
Choose a base ref
...
head repository: offish/tf2-data
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
  • 6 commits
  • 8 files changed
  • 1 contributor

Commits on Jul 19, 2024

  1. Copy the full SHA
    8b3d2d8 View commit details
  2. update readme

    offish committed Jul 19, 2024
    Copy the full SHA
    210f8af View commit details
  3. Merge pull request #7 from offish/v0.0.8

    v0.0.8
    offish authored Jul 19, 2024
    Copy the full SHA
    b0d995a View commit details

Commits on Oct 13, 2024

  1. Copy the full SHA
    2f0fa58 View commit details

Commits on Nov 20, 2024

  1. update items

    offish committed Nov 20, 2024
    Copy the full SHA
    b0f00cc View commit details

Commits on Dec 12, 2024

  1. add smissmas 2024 items

    offish committed Dec 12, 2024
    Copy the full SHA
    89c7fcf View commit details
Showing with 67,409 additions and 23,889 deletions.
  1. +1 −0 .gitignore
  2. +20 −1 README.md
  3. +6 −6 src/tf2_data/__init__.py
  4. +3,470 −206 src/tf2_data/json/defindex_full_names.json
  5. +2,402 −272 src/tf2_data/json/defindex_names.json
  6. +180 −10 src/tf2_data/json/effects.json
  7. +61,329 −23,392 src/tf2_data/json/schema_items.json
  8. +1 −2 src/tf2_data/schema.py
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.vscode
__pycache__
update.py
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -30,4 +30,23 @@ python -m pip install --upgrade tf2-data
## Testing
```bash
# tf2-data/
python -m unittest
python -m unittest
```

## Update files after new update
To update the local files after a TF2 update run this snippet.

```python
from tf2_data.schema import Schema, SchemaItems, IEconItems

api_key = "STEAM_API_KEY"
schema = Schema(api_key=api_key)
schema.set_effects()

ieconitems = IEconItems(api_key)
items = ieconitems.set_all_schema_items()

schema_items = SchemaItems(items)
schema_items.map_defindex_name()
schema_items.map_defindex_full_name()
```
12 changes: 6 additions & 6 deletions src/tf2_data/__init__.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
__title__ = "tf2-data"
__author__ = "offish"
__version__ = "0.0.7"
__version__ = "0.3.0"
__license__ = "MIT"

from .schema import Schema, SchemaItems, IEconItems
from .static import *
from .files import (
EFFECTS,
SCHEMA_ITEMS,
DEFINDEX_NAMES,
DEFINDEX_FULL_NAMES,
DEFINDEX_NAMES,
EFFECTS,
ITEM_NAME_IDS,
SCHEMA_ITEMS,
)
from .schema import IEconItems, Schema, SchemaItems
from .static import *

# flake8: noqa
Loading