Skip to main content

CS2 pattern utility

Project description

Contributors Forks Stargazers Issues GPLv3 License Xing

cs2pattern

Overview

cs2pattern is a python package used for working with cs2 paint seeds, aka pattern.

Installation

pip install cs2pattern

Usage

Quick start

from cs2pattern import check_rare

is_rare, details = check_rare("★ Karambit | Case Hardened (Factory New)", 941)
if is_rare:
    pattern_name, index = details
    print(f"Rare pattern: {pattern_name} (index {index})")
else:
    print("Nothing special here.")

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("Patterns:", patterns)
print("Ordered:", ordered)

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"])

Contributing

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

License

GPLv3 License. See the LICENSE file for details.

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

cs2pattern-0.4.0.tar.gz (19.1 kB view details)

Uploaded Source

Built Distribution

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

cs2pattern-0.4.0-py3-none-any.whl (19.9 kB view details)

Uploaded Python 3

File details

Details for the file cs2pattern-0.4.0.tar.gz.

File metadata

  • Download URL: cs2pattern-0.4.0.tar.gz
  • Upload date:
  • Size: 19.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for cs2pattern-0.4.0.tar.gz
Algorithm Hash digest
SHA256 084d994b158dc4d42f3732b0b97e947084070159a9de40456949e2bf86c4e62d
MD5 ce9f669f8e7734f05e2f421b821c2524
BLAKE2b-256 1542e9868765783693689b8ac3d6cc04c2e10352aba796dfa2d46b91564bdd4c

See more details on using hashes here.

Provenance

The following attestation bundles were made for cs2pattern-0.4.0.tar.gz:

Publisher: python-publish.yml on Helyux/cs2pattern

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

File details

Details for the file cs2pattern-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: cs2pattern-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 19.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for cs2pattern-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8c3ddd33a708695910ae2ac9c9a27052c99549604029aa5b9b5e2a87fa67264c
MD5 8cd6b87f90d4823241f3c2c4c3ca43ef
BLAKE2b-256 f00dac075fa652524994c4dca5fd60303d7e4b2353d4d32160def64b43d83ac5

See more details on using hashes here.

Provenance

The following attestation bundles were made for cs2pattern-0.4.0-py3-none-any.whl:

Publisher: python-publish.yml on Helyux/cs2pattern

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