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.
Metadata
Release files for cs2pattern 0.9.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cs2pattern-0.9.1.tar.gz | 20.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cs2pattern-0.9.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 42.5 kB
Release files / cs2pattern-0.9.1.tar.gz
| Download URL | cs2pattern-0.9.1.tar.gz |
|---|---|
| Size | 20.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
666ab38a88d8dbbe266e16e06aa4668dc15300f4c75875fcc4a5538f21f15d26
|
|
BLAKE2b-256 checksum How to use checksums |
9700a6e0d98eff61c4639ca1896ff717cc694eedb4fcf52b7ba456d0c1dafb39
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 9, 2026.
Transparency logRelease files / cs2pattern-0.9.1-py3-none-any.whl
| Download URL | cs2pattern-0.9.1-py3-none-any.whl |
|---|---|
| Size | 21.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
27723fe965356dc6eb227ee1b1e4dc4e22a3f1b74ee555e01b80c80d434ea9b7
|
|
BLAKE2b-256 checksum How to use checksums |
845d4b61fd3da050e3d54326895be85301bcf77f480c720b631edaf8648e38fc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 9, 2026.
Transparency log