CS2 pattern utility
Project description
cs2pattern
Overview
cs2pattern is a python package used to identify different rare pattern from counter-strike skins given a pattern number.
Installation
pip install cs2pattern
Usage
Quick start
To check if your skin has a rare pattern:
from cs2pattern import check_rare
# Provide full item name and pattern number
result = check_rare("★ Karambit | Case Hardened (Factory New)", 269)
if result.rare:
if result.ordered and result.order:
rank, total = result.order
print(f"Rare pattern: {result.name} (rank {rank}/{total})")
else:
print(f"Rare pattern: {result.name}")
#=> Rare pattern: gem_blue (rank 5/14)
Modular helpers
When you already know the skin family you care about, import the helper functions:
from cs2pattern import gem_black
patterns, ordered = gem_black("skeleton knife")
print(f"Patterns: {patterns} / Ordered: {ordered}")
#=> Patterns: [446, 791, 497, 28] / Ordered: True
Raw catalog access
Helper names match the pattern groups inside pattern.json, so you can discover what is available by calling get_pattern_dict() and inspecting the keys.
from cs2pattern import get_pattern_dict
catalog = get_pattern_dict()
scorched_ursus = catalog["scorched"]["ursus knife"][0]
print(scorched_ursus["pattern"])
#=> [446, 791]
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 cs2pattern-0.8.0.tar.gz.
File metadata
- Download URL: cs2pattern-0.8.0.tar.gz
- Upload date:
- Size: 20.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d55a8d8eaf0d2e473168142dcee1d8c68b9c56f62ada175fd49c1901d2cdc02
|
|
| MD5 |
27ab5a48008c2e0065570f302955b5ad
|
|
| BLAKE2b-256 |
50145cc5257e86832dabe651f70852881bc59193bd6cba8b30cd3af7fc3d63bf
|
Provenance
The following attestation bundles were made for cs2pattern-0.8.0.tar.gz:
Publisher:
python-publish.yml on Helyux/cs2pattern
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cs2pattern-0.8.0.tar.gz -
Subject digest:
8d55a8d8eaf0d2e473168142dcee1d8c68b9c56f62ada175fd49c1901d2cdc02 - Sigstore transparency entry: 1084649669
- Sigstore integration time:
-
Permalink:
Helyux/cs2pattern@bc5dbb0b51f0ebe07645b7e72642c697f3fefd18 -
Branch / Tag:
refs/tags/v0.8.0 - Owner: https://github.com/Helyux
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@bc5dbb0b51f0ebe07645b7e72642c697f3fefd18 -
Trigger Event:
release
-
Statement type:
File details
Details for the file cs2pattern-0.8.0-py3-none-any.whl.
File metadata
- Download URL: cs2pattern-0.8.0-py3-none-any.whl
- Upload date:
- Size: 21.5 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 |
fb11493ea569e805d512534510c368080d322ac336cd0d2ec769e3b8e21f342f
|
|
| MD5 |
c80605f4eef643dbc523f2d22185c3e9
|
|
| BLAKE2b-256 |
303923bb868057a6bbf417bcab3a11c7660fdf7b61d9a096ca676511759b9ec5
|
Provenance
The following attestation bundles were made for cs2pattern-0.8.0-py3-none-any.whl:
Publisher:
python-publish.yml on Helyux/cs2pattern
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cs2pattern-0.8.0-py3-none-any.whl -
Subject digest:
fb11493ea569e805d512534510c368080d322ac336cd0d2ec769e3b8e21f342f - Sigstore transparency entry: 1084649722
- Sigstore integration time:
-
Permalink:
Helyux/cs2pattern@bc5dbb0b51f0ebe07645b7e72642c697f3fefd18 -
Branch / Tag:
refs/tags/v0.8.0 - Owner: https://github.com/Helyux
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@bc5dbb0b51f0ebe07645b7e72642c697f3fefd18 -
Trigger Event:
release
-
Statement type: