CS2 inspect link utility
Project description
cs2inspect
Overview
cs2inspect is a python package used for creating and working with counter-strike inspect links and gen codes.
Features
-
Creating 'unmasked' inspect links (containing the owners steam id)
-
Creating 'masked' inspect links (not containing the owners steam id)
-
Creating gen codes
-
Creating console pasteable inspect links
-
Checking inspect link validity (using regex)
-
Structured protobuf creation
-
Hex data handling (for 'masked' inspect links)
Installation
pip install cs2inspect
Example usage
import cs2inspect
# Build an inspect link from a known steam id ('unmasked' inspect link)
link_data = {
'asset_id': '38350177019',
'class_id': '9385506221951591925',
'owner_id': '76561198066322090'
}
link_str = cs2inspect.link(link_data)
print(link_str) # = steam://rungame/730/76561202255233023/+csgo_econ_action_preview%20S76561198066322090A38350177019D9385506221951591925
# Or build an inspect link from data only ('masked' inspect link)
proto_base = cs2inspect.Builder(
defindex=7,
paintindex=941,
paintseed=2,
paintwear=0.22540508210659027,
rarity=5,
)
# You can also change and add attributes of the proto_base after creation
proto_base.stickers.append({'slot': 2, 'sticker_id': 7203, 'wear': 0})
proto_base.keychains.append({'slot': 0,'sticker_id': 36,
'offset_x': 4.515311241149902,
'offset_y': 0.5914779901504517,
'offset_z': 8.906611442565918})
try:
# Build the protobuf
protobuf = proto_base.build()
except Exception as e:
print(f"Build failed: {e}")
exit(1)
link_str = cs2inspect.link(protobuf)
print(link_str) # = steam://rungame/730/76561202255233023/+csgo_econ_action_preview%2000180720AD0728053897A19BF3034002620A080210A3381D00000000A20118080010241D000000003D6E7D9040451A6B173F4D7B810E4191B1FE6E
# Get a command you can paste directly into the in-game console
console_str = cs2inspect.link_console(protobuf)
print(console_str) # = csgo_econ_action_preview 00180720AD0728053897A19BF3034002620A080210A3381D00000000A20118080010241D000000003D6E7D9040451A6B173F4D7B810E4191B1FE6E
# You can also create gen codes from the protobuf
gen_str = cs2inspect.gen(protobuf, prefix="!g") # You can omit the prefix to get '!gen'
print(gen_str) # = !g 7 941 2 0.22540508 0 0 0 0 7203 0 0 0 0 0 36 0
Contributing
Contributions are welcome! Open an issue or submit a pull request.
License
GPLv3 License. See the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cs2inspect-0.3.1.tar.gz.
File metadata
- Download URL: cs2inspect-0.3.1.tar.gz
- Upload date:
- Size: 21.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
abb1e30cb8b97868779b5bb8bfa23d5debe18bdfe5f1717409c9281ec5692151
|
|
| MD5 |
615aed27cce1a5431b86047daafda24c
|
|
| BLAKE2b-256 |
8beb682b0b6de9220fcce4cb6740377c1a69875a5de15e48f9e47f23255b5b30
|
Provenance
The following attestation bundles were made for cs2inspect-0.3.1.tar.gz:
Publisher:
python-publish.yml on Helyux/cs2inspect
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cs2inspect-0.3.1.tar.gz -
Subject digest:
abb1e30cb8b97868779b5bb8bfa23d5debe18bdfe5f1717409c9281ec5692151 - Sigstore transparency entry: 928242508
- Sigstore integration time:
-
Permalink:
Helyux/cs2inspect@64e445a7a124df423d6b7d3de49b1ca59af6adee -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/Helyux
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@64e445a7a124df423d6b7d3de49b1ca59af6adee -
Trigger Event:
release
-
Statement type:
File details
Details for the file cs2inspect-0.3.1-py3-none-any.whl.
File metadata
- Download URL: cs2inspect-0.3.1-py3-none-any.whl
- Upload date:
- Size: 23.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d768516ae8f6ed83f5d16899e055caa26b04beab9668c0f6a7b7bb2f72620b1c
|
|
| MD5 |
3f76274cf7748c6f39e740b2c85e7707
|
|
| BLAKE2b-256 |
5b7a36fd2a4025af86f9154314ec5fbb87e4db73beed8f77599a33b02d66b1fb
|
Provenance
The following attestation bundles were made for cs2inspect-0.3.1-py3-none-any.whl:
Publisher:
python-publish.yml on Helyux/cs2inspect
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cs2inspect-0.3.1-py3-none-any.whl -
Subject digest:
d768516ae8f6ed83f5d16899e055caa26b04beab9668c0f6a7b7bb2f72620b1c - Sigstore transparency entry: 928242509
- Sigstore integration time:
-
Permalink:
Helyux/cs2inspect@64e445a7a124df423d6b7d3de49b1ca59af6adee -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/Helyux
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@64e445a7a124df423d6b7d3de49b1ca59af6adee -
Trigger Event:
release
-
Statement type: