Skip to content

Commit e416649

Browse files
authored
Merge pull request #1 from Helyux/dev
Release 0.4.0
2 parents d9f9388 + aaf63f3 commit e416649

File tree

9 files changed

+1204
-240
lines changed

9 files changed

+1204
-240
lines changed

README.md

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[![Forks][forks-shield]][forks-url]
66
[![Stargazers][stars-shield]][stars-url]
77
[![Issues][issues-shield]][issues-url]
8-
[![MIT License][license-shield]][license-url]
8+
[![GPLv3 License][license-shield]][license-url]
99
[![Xing][xing-shield]][xing-url]
1010
</div>
1111

@@ -21,6 +21,45 @@
2121
pip install cs2pattern
2222
```
2323

24+
## Usage
25+
26+
### Quick start
27+
28+
```python
29+
from cs2pattern import check_rare
30+
31+
is_rare, details = check_rare("★ Karambit | Case Hardened (Factory New)", 941)
32+
if is_rare:
33+
pattern_name, index = details
34+
print(f"Rare pattern: {pattern_name} (index {index})")
35+
else:
36+
print("Nothing special here.")
37+
```
38+
39+
### Modular helpers
40+
41+
When you already know the skin family you care about, import the helper functions:
42+
43+
```python
44+
from cs2pattern import gem_black
45+
46+
patterns, ordered = gem_black("skeleton knife")
47+
print("Patterns:", patterns)
48+
print("Ordered:", ordered)
49+
```
50+
51+
### Raw catalog access
52+
53+
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.
54+
55+
```python
56+
from cs2pattern import get_pattern_dict
57+
58+
catalog = get_pattern_dict()
59+
scorched_ursus = catalog["scorched"]["ursus knife"][0]
60+
print(scorched_ursus["pattern"])
61+
```
62+
2463
## Contributing
2564
Contributions are welcome! Open an issue or submit a pull request.
2665

@@ -37,7 +76,7 @@ GPLv3 License. See the LICENSE file for details.
3776
[stars-url]: https://github.com/Helyux/cs2pattern/stargazers
3877
[issues-shield]: https://img.shields.io/github/issues/Helyux/cs2pattern.svg?style=for-the-badge
3978
[issues-url]: https://github.com/Helyux/cs2pattern/issues
40-
[license-shield]: https://img.shields.io/github/license/Helyux/cs2pattern.svg?style=for-the-badge
79+
[license-shield]: https://img.shields.io/badge/License-GPLv3-blue.svg?style=for-the-badge
4180
[license-url]: https://github.com/Helyux/cs2pattern/blob/master/LICENSE
4281
[xing-shield]: https://img.shields.io/static/v1?style=for-the-badge&message=Xing&color=006567&logo=Xing&logoColor=FFFFFF&label
4382
[xing-url]: https://www.xing.com/profile/Lukas_Mahler10

cs2pattern/__init__.py

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,37 @@
1-
__author__ = "Lukas Mahler"
2-
__version__ = "0.0.0"
3-
__date__ = "28.03.2025"
4-
__email__ = "m@hler.eu"
5-
__status__ = "Development"
6-
7-
8-
from cs2pattern.check import check_rare, get_pattern_dict
9-
from cs2pattern.modular import *
10-
11-
__all__ = [
12-
'check_rare',
13-
'get_pattern_dict',
14-
15-
'abyss',
1+
__author__ = "Lukas Mahler"
2+
__version__ = "0.4.0"
3+
__date__ = "15.10.2025"
4+
__email__ = "m@hler.eu"
5+
__status__ = "Development"
6+
7+
from cs2pattern.check import check_rare, get_pattern_dict
8+
from cs2pattern.modular import *
9+
10+
__all__ = [
11+
'check_rare',
12+
'get_pattern_dict',
13+
'abyss',
1614
'berries',
1715
'blaze',
1816
'fire_and_ice',
17+
'gem_black',
1918
'gem_blue',
2019
'gem_diamond',
2120
'gem_gold',
2221
'gem_green',
2322
'gem_pink',
24-
'gem_purple',
25-
'gem_white',
26-
'grinder',
27-
'hive',
28-
'moonrise',
29-
'paw',
23+
'gem_purple',
24+
'gem_white',
25+
'grinder',
26+
'hive_blue',
27+
'hive_orange',
28+
'moonrise',
29+
'nocts',
30+
'paw',
3031
'phoenix',
31-
'pussy'
32+
'pussy',
3233
]
33-
34-
35-
if __name__ == '__main__':
36-
exit(1)
34+
35+
36+
if __name__ == '__main__':
37+
exit(1)

0 commit comments

Comments
 (0)