Skip to main content

CS2 inspect link utility

Project description

Contributors Forks Stargazers Issues Downloads GPLv3 License

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' (XOR-capable) inspect links
  • Decoding/Parsing inspect links back into data or protobuf objects
  • Parsing Enrichment: Resolve numeric IDs to human-readable names (Weapon, Skin, Rarity, Origin, Quality, etc.)
  • Creating gen codes
  • Creating console pasteable inspect links
  • Checking inspect link validity (robust regex supporting modern CS2 formats)

Installation

pip install cs2inspect

Quick Start

Link Creation

import cs2inspect

# Create a modern 'masked' link using the Builder
proto = cs2inspect.Builder(
    defindex=7,
    paintindex=941,
    paintseed=0,
    paintwear=0.15,
    rarity=5
)
link = cs2inspect.link(proto.build())
print(link) # steam://rungame/730/76561202255233023/+csgo_econ_action_preview%2000180720AD072805389AB3E6F00340006F59908E

Basic Parsing

import cs2inspect

# Parse a modern 'masked' inspect link
link = "steam://run/730//+csgo_econ_action_preview%206A7AC7C6BEDED06B72704ACE6F426F5A635296868780692AAC6C226A3A6A02E9EAEAEA661A625E7EE646"
data = cs2inspect.parse(link)

print(data['defindex'])    # 26 (PP-Bizon)
print(data['floatvalue'])  # 0.05357979

Smart Enrichment

import cs2inspect

# Resolve IDs to names using an external schema
cs2inspect.download_schema()
info = cs2inspect.parse(link, enrich=True)

print(info['full_item_name']) # AK-47 | Slate (Minimal Wear)

Documentation

For detailed information, please refer to the following docs:

  • Example Usage: Comprehensive examples for link creation, parsing, and enrichment.
  • Output Model: Detailed specification of the dictionary structure returned by parse().

Technical Limitations (Parsing)

cs2inspect is a local, offline decoder. Masked/Modern links (binary Protobuf payload) are fully supported with offline enrichment of stickers, floats, and charms. Unmasked/Legacy links (S/M A D pointers) have only minimal support as they contain no binary property data; resolving their attributes requires a call to the GameCoordinator (GC), which is outside the scope of this offline library.

Contributing

Contributions are welcome! Open an issue or submit a pull request.

License

GPLv3 License. See the LICENSE file for details.

Acknowledgements

Special thanks to these projects for their foundational work and metadata tracking:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cs2inspect-0.5.0.tar.gz (37.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cs2inspect-0.5.0-py3-none-any.whl (41.5 kB view details)

Uploaded Python 3

File details

Details for the file cs2inspect-0.5.0.tar.gz.

File metadata

  • Download URL: cs2inspect-0.5.0.tar.gz
  • Upload date:
  • Size: 37.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for cs2inspect-0.5.0.tar.gz
Algorithm Hash digest
SHA256 57a7265f7bef4910711bfde79b71db9b73f0418c744bcf7781d6ef4a5ec8c103
MD5 b3357ad03b3107f94806946ea2f8856f
BLAKE2b-256 489e19193f5a8be33750d673a02a08f8a874e455d6a4d5d9f4f0cc84d5ac4ef9

See more details on using hashes here.

Provenance

The following attestation bundles were made for cs2inspect-0.5.0.tar.gz:

Publisher: python-publish.yml on Helyux/cs2inspect

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cs2inspect-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: cs2inspect-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 41.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for cs2inspect-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 00d4f3d1f9a015d7d03aa66e11be107696aa0f4723f486629f64d8e4c6cd953c
MD5 32b57b4fdbc98a7fba359066d77cb392
BLAKE2b-256 0ca510c508b3ec0cdfcba9d1f68763586be1130671c46b6d22b7c3a7f952d914

See more details on using hashes here.

Provenance

The following attestation bundles were made for cs2inspect-0.5.0-py3-none-any.whl:

Publisher: python-publish.yml on Helyux/cs2inspect

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page