STRling 2.5.3__tar.gz → 2.5.6__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2 @@
1
+ include README.md
2
+ recursive-include STRling *.py
strling-2.5.6/PKG-INFO ADDED
@@ -0,0 +1,85 @@
1
+ Metadata-Version: 2.4
2
+ Name: STRling
3
+ Version: 2.5.6
4
+ Home-page: https://github.com/TheCyberLocal/STRling
5
+ Author: TheCyberLocal
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/TheCyberLocal/STRling
8
+ Project-URL: Documentation, https://github.com/TheCyberLocal/STRling/tree/main/docs
9
+ Project-URL: Issues, https://github.com/TheCyberLocal/STRling/issues
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Requires-Python: >=3.8
13
+ Description-Content-Type: text/markdown
14
+ Dynamic: author
15
+ Dynamic: classifier
16
+ Dynamic: description
17
+ Dynamic: description-content-type
18
+ Dynamic: home-page
19
+ Dynamic: license
20
+ Dynamic: project-url
21
+ Dynamic: requires-python
22
+
23
+ # STRling.py
24
+
25
+ ## 🗺️ Overview
26
+
27
+ This is the **Python binding** for [STRling](https://github.com/TheCyberLocal/STRling), a next-generation production-grade syntax designed as a user interface for writing powerful regular expressions (RegEx).
28
+
29
+ STRling makes string validation and matching **readable, safe, and consistent** across environments. Instead of cryptic regex syntax, you build patterns using a clean, object-oriented DSL. Under the hood, STRling compiles to native RegEx engines — but adds instructional error handling and consistent semantics.
30
+
31
+ ## 🗝️ Key Features
32
+
33
+ - **Beginner Friendly**: No regex jargon required.
34
+ - **Reliable**: Built only on standard libraries.
35
+ - **Instructional Errors**: Explains what went wrong and how to fix it.
36
+ - **Consistent**: Works across frameworks and libraries without custom validators.
37
+ - **Multilingual**: Available across popular programming languages.
38
+
39
+ ## 💾 Installation
40
+
41
+ Install STRling via pip:
42
+
43
+ ```sh
44
+ pip install STRling
45
+ ```
46
+
47
+ ## ✨ STRling in action!
48
+
49
+ ```python
50
+ from STRling import simply as s
51
+ import re
52
+
53
+ # Define parts of a US phone number pattern
54
+ separator = s.in_chars(" -")
55
+ area_code = s.merge(
56
+ s.may("("),
57
+ s.group("area_code", s.digit(3)),
58
+ s.may(")")
59
+ )
60
+ central_part = s.group("central_part", s.digit(3))
61
+ last_part = s.group("last_part", s.digit(4))
62
+
63
+ phone_number_pattern = s.merge(
64
+ area_code,
65
+ s.may(separator),
66
+ central_part,
67
+ s.may(separator),
68
+ last_part
69
+ )
70
+
71
+ # Compile to RegEx
72
+ example_text = "(123) 456-7890 and 123-456-7890"
73
+ pattern = re.compile(str(phone_number_pattern))
74
+ matches = pattern.finditer(example_text)
75
+
76
+ for match in matches:
77
+ print("Full Match:", match.group())
78
+ print("Area Code:", match.group("area_code"))
79
+ print("Central Part:", match.group("central_part"))
80
+ print("Last Part:", match.group("last_part"))
81
+ ```
82
+
83
+ ## 💖 Support
84
+
85
+ If you find STRling useful, consider [buying me a coffee](https://buymeacoffee.com/thecyberlocal).
@@ -0,0 +1,63 @@
1
+ # STRling.py
2
+
3
+ ## 🗺️ Overview
4
+
5
+ This is the **Python binding** for [STRling](https://github.com/TheCyberLocal/STRling), a next-generation production-grade syntax designed as a user interface for writing powerful regular expressions (RegEx).
6
+
7
+ STRling makes string validation and matching **readable, safe, and consistent** across environments. Instead of cryptic regex syntax, you build patterns using a clean, object-oriented DSL. Under the hood, STRling compiles to native RegEx engines — but adds instructional error handling and consistent semantics.
8
+
9
+ ## 🗝️ Key Features
10
+
11
+ - **Beginner Friendly**: No regex jargon required.
12
+ - **Reliable**: Built only on standard libraries.
13
+ - **Instructional Errors**: Explains what went wrong and how to fix it.
14
+ - **Consistent**: Works across frameworks and libraries without custom validators.
15
+ - **Multilingual**: Available across popular programming languages.
16
+
17
+ ## 💾 Installation
18
+
19
+ Install STRling via pip:
20
+
21
+ ```sh
22
+ pip install STRling
23
+ ```
24
+
25
+ ## ✨ STRling in action!
26
+
27
+ ```python
28
+ from STRling import simply as s
29
+ import re
30
+
31
+ # Define parts of a US phone number pattern
32
+ separator = s.in_chars(" -")
33
+ area_code = s.merge(
34
+ s.may("("),
35
+ s.group("area_code", s.digit(3)),
36
+ s.may(")")
37
+ )
38
+ central_part = s.group("central_part", s.digit(3))
39
+ last_part = s.group("last_part", s.digit(4))
40
+
41
+ phone_number_pattern = s.merge(
42
+ area_code,
43
+ s.may(separator),
44
+ central_part,
45
+ s.may(separator),
46
+ last_part
47
+ )
48
+
49
+ # Compile to RegEx
50
+ example_text = "(123) 456-7890 and 123-456-7890"
51
+ pattern = re.compile(str(phone_number_pattern))
52
+ matches = pattern.finditer(example_text)
53
+
54
+ for match in matches:
55
+ print("Full Match:", match.group())
56
+ print("Area Code:", match.group("area_code"))
57
+ print("Central Part:", match.group("central_part"))
58
+ print("Last Part:", match.group("last_part"))
59
+ ```
60
+
61
+ ## 💖 Support
62
+
63
+ If you find STRling useful, consider [buying me a coffee](https://buymeacoffee.com/thecyberlocal).
@@ -0,0 +1,85 @@
1
+ Metadata-Version: 2.4
2
+ Name: STRling
3
+ Version: 2.5.6
4
+ Home-page: https://github.com/TheCyberLocal/STRling
5
+ Author: TheCyberLocal
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/TheCyberLocal/STRling
8
+ Project-URL: Documentation, https://github.com/TheCyberLocal/STRling/tree/main/docs
9
+ Project-URL: Issues, https://github.com/TheCyberLocal/STRling/issues
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Requires-Python: >=3.8
13
+ Description-Content-Type: text/markdown
14
+ Dynamic: author
15
+ Dynamic: classifier
16
+ Dynamic: description
17
+ Dynamic: description-content-type
18
+ Dynamic: home-page
19
+ Dynamic: license
20
+ Dynamic: project-url
21
+ Dynamic: requires-python
22
+
23
+ # STRling.py
24
+
25
+ ## 🗺️ Overview
26
+
27
+ This is the **Python binding** for [STRling](https://github.com/TheCyberLocal/STRling), a next-generation production-grade syntax designed as a user interface for writing powerful regular expressions (RegEx).
28
+
29
+ STRling makes string validation and matching **readable, safe, and consistent** across environments. Instead of cryptic regex syntax, you build patterns using a clean, object-oriented DSL. Under the hood, STRling compiles to native RegEx engines — but adds instructional error handling and consistent semantics.
30
+
31
+ ## 🗝️ Key Features
32
+
33
+ - **Beginner Friendly**: No regex jargon required.
34
+ - **Reliable**: Built only on standard libraries.
35
+ - **Instructional Errors**: Explains what went wrong and how to fix it.
36
+ - **Consistent**: Works across frameworks and libraries without custom validators.
37
+ - **Multilingual**: Available across popular programming languages.
38
+
39
+ ## 💾 Installation
40
+
41
+ Install STRling via pip:
42
+
43
+ ```sh
44
+ pip install STRling
45
+ ```
46
+
47
+ ## ✨ STRling in action!
48
+
49
+ ```python
50
+ from STRling import simply as s
51
+ import re
52
+
53
+ # Define parts of a US phone number pattern
54
+ separator = s.in_chars(" -")
55
+ area_code = s.merge(
56
+ s.may("("),
57
+ s.group("area_code", s.digit(3)),
58
+ s.may(")")
59
+ )
60
+ central_part = s.group("central_part", s.digit(3))
61
+ last_part = s.group("last_part", s.digit(4))
62
+
63
+ phone_number_pattern = s.merge(
64
+ area_code,
65
+ s.may(separator),
66
+ central_part,
67
+ s.may(separator),
68
+ last_part
69
+ )
70
+
71
+ # Compile to RegEx
72
+ example_text = "(123) 456-7890 and 123-456-7890"
73
+ pattern = re.compile(str(phone_number_pattern))
74
+ matches = pattern.finditer(example_text)
75
+
76
+ for match in matches:
77
+ print("Full Match:", match.group())
78
+ print("Area Code:", match.group("area_code"))
79
+ print("Central Part:", match.group("central_part"))
80
+ print("Last Part:", match.group("last_part"))
81
+ ```
82
+
83
+ ## 💖 Support
84
+
85
+ If you find STRling useful, consider [buying me a coffee](https://buymeacoffee.com/thecyberlocal).
@@ -1,3 +1,4 @@
1
+ MANIFEST.in
1
2
  README.md
2
3
  setup.py
3
4
  STRling/__init__.py
strling-2.5.6/setup.py ADDED
@@ -0,0 +1,27 @@
1
+ from pathlib import Path
2
+ from setuptools import setup, find_packages
3
+
4
+ here = Path(__file__).parent
5
+ readme = (here / "README.md").read_text(encoding="utf-8")
6
+
7
+ setup(
8
+ name='STRling',
9
+ version='2.5.6',
10
+ packages=find_packages(),
11
+ install_requires=[],
12
+ long_description=readme,
13
+ long_description_content_type='text/markdown',
14
+ url="https://github.com/TheCyberLocal/STRling",
15
+ project_urls={
16
+ "Homepage": "https://github.com/TheCyberLocal/STRling",
17
+ "Documentation": "https://github.com/TheCyberLocal/STRling/tree/main/docs",
18
+ "Issues": "https://github.com/TheCyberLocal/STRling/issues",
19
+ },
20
+ author="TheCyberLocal",
21
+ license="MIT", # SPDX identifier; keeps setuptools happy
22
+ classifiers=[
23
+ "Programming Language :: Python :: 3",
24
+ "License :: OSI Approved :: MIT License",
25
+ ],
26
+ python_requires=">=3.8",
27
+ )
strling-2.5.3/PKG-INFO DELETED
@@ -1,127 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: STRling
3
- Version: 2.5.3
4
- Description-Content-Type: text/markdown
5
-
6
- # STRling
7
-
8
- ## 🗺️ [Project Overview](https://github.com/TheCyberLocal/STRling)
9
-
10
- STRling is a next-generation production-grade syntax designed as a user interface for writing powerful regular expressions (RegEx) with an object-oriented approach and instructional error handling. STRling recognizes the cryptic nature of raw regular expression is challenging and susceptible to errors, which is why STRling keeps it as far from you as possible while maintaining the same power and flexibility. String validation should be simple and enjoyable, not a hassle. Best of all, STRling syntax is built upon the RegEx engine, making it fully compatible with all libraries that accept RegEx along with the traditional built-in RegEx methods.
11
-
12
- ## 🗝️ Key Features
13
-
14
- 1. **Beginner Friendly:** You need ZERO knowledge of RegEx jargon to create powerful and clear-to-read patterns.
15
- 2. **Reliable Logic:** STRling exclusively utilizes built-in libraries, making it a reliable package.
16
- 3. **Instructional Error Handling:** Errors inevitably occur by drafting invalid patterns, so STRling explains to the developer exactly what was done wrong and how to correct it.
17
- 4. **Consistent and Readable:** Make your projects clear and consistent by using STRling rather than the individual library string validators that each have their own syntax (Sqlite3, Sequelize, Postgres, WTForms... etc.).
18
- 5. **Multilingual Availability:** STRling is not just a package, but a concept brought to you through multiple widely used languages.
19
-
20
- These key features collectively emphasize and fortify the claim that STRling truly is a next-generation production-grade syntax for pattern handling.
21
-
22
- ## 🎯 Project Mission
23
-
24
- Our mission is to make RegEx a distant and outdated syntax by abstracting the complexities of RegEx into a clean, readable, and powerful interface. We strive to simplify string operations and ensure that developers can focus on building their applications without the steep learning curve of traditional RegEx. The previous alternative to RegEx was to learn the string validation syntax specific to each user input library, but STRling aims to unify the disparate syntaxes found across various libraries and frameworks into one simple library using only built-in packages.
25
-
26
- ## 💾 Installation
27
-
28
- Install STRling via pip:
29
-
30
- ```sh
31
- pip install STRling
32
- ```
33
-
34
- ## ✨ STRling in action!
35
-
36
- ### 📑 [STRling Documentation on GitHub](https://github.com/TheCyberLocal/STRling-Py/blob/main/docs/strling_docs.md)
37
-
38
- ```python
39
- from STRling import simply as s
40
- import re
41
-
42
-
43
- # Let's make a phone number pattern for the formats below:
44
- # - (123) 456-7890
45
- # - 123-456-7890
46
- # - 123 456 7890
47
- # - 1234567890
48
-
49
- # Separator: either space or hyphen
50
- separator = s.in_chars(' -')
51
-
52
- # Optional area code part: 123 even if in parenthesis like (123)
53
- area_code = s.merge( # notice we use merge since we don't want to name the group with parenthesis
54
- s.may('('), # Optional opening parenthesis
55
- s.group('area_code', s.digit(3)), # Exactly 3 digits and named for later reference
56
- s.may(')') # Optional closing parenthesis
57
- )
58
-
59
- # Central part: 456
60
- central_part = s.group('central_part', s.digit(3)) # Exactly 3 digits and named for later reference
61
-
62
- # Last part: 7890
63
- last_part = s.group("last_part", s.digit(4)) # Exactly 4 digits and named for later reference
64
-
65
- # Combine all parts into the final phone number pattern
66
- # Notice we don't name the whole pattern since we can already reference it
67
- phone_number_pattern = s.merge(
68
- area_code, # Area code part
69
- s.may(separator), # Optional separator after area code
70
- central_part, # Central 3 digits
71
- s.may(separator), # Optional separator after area code
72
- last_part # Last part with hyphen and 4 digits
73
- )
74
-
75
- # Example usage
76
- # Note: To make a pattern a RegEx string compatible with other engines use `str(pattern)`.
77
- example_text = "(123) 456-7890 and 123-456-7890"
78
- pattern = re.compile(str(phone_number_pattern)) # Notice str(pattern)
79
- matches = pattern.finditer(example_text)
80
-
81
- for match in matches:
82
- print("Full Match:", match.group())
83
- print("Area Code:", match.group("area_code"))
84
- print("Central Part:", match.group("central_part"))
85
- print("Last Part:", match.group("last_part"))
86
- print()
87
-
88
- # Output:
89
- # Full Match: (123) 456-7890
90
- # Area Code: 123
91
- # Central Part: 456
92
- # Last Part: 7890
93
-
94
- # Full Match: 123-456-7890
95
- # Area Code: 123
96
- # Central Part: 456
97
- # Last Part: 7890
98
- ```
99
-
100
- Simplify your string validation and matching tasks with STRling, the all-in-one solution for developers who need a powerful yet user-friendly tool for working with strings. No longer write RegEx using complex jargon or the various syntaxes string validation specific to independent libraries. Download and start using STRling today!
101
-
102
- ## 🌎 Locations
103
-
104
- ### STRling for Python
105
-
106
- [![](https://img.shields.io/pypi/v/STRling?color=blue&logo=pypi)](https://pypi.org/project/STRling/)
107
- [![](https://img.shields.io/badge/GitHub-black?logo=github&logoColor=white)](https://github.com/TheCyberLocal/STRling-Py)
108
-
109
- ### STRling for JavaScript
110
-
111
- [![](https://img.shields.io/npm/v/@thecyberlocal/strling?color=blue&logo=npm)](https://www.npmjs.com/package/@thecyberlocal/strling)
112
- [![](https://img.shields.io/badge/GitHub-black?logo=github&logoColor=white)](https://github.com/TheCyberLocal/STRling-JS)
113
-
114
- ## 🌐 Socials
115
-
116
- [![LinkedIn](https://img.shields.io/badge/LinkedIn-%230077B5.svg?logo=linkedin&logoColor=white)](https://linkedin.com/in/tzm01)
117
- [![GitHub](https://img.shields.io/badge/GitHub-black?logo=github&logoColor=white)](https://github.com/TheCyberLocal)
118
- [![PyPI](https://img.shields.io/badge/PyPI-3776AB?logo=pypi&logoColor=white)](https://pypi.org/user/TheCyberLocal/)
119
- [![npm](https://img.shields.io/badge/npm-%23FFFFFF.svg?logo=npm&logoColor=D00000)](https://www.npmjs.com/~thecyberlocal)
120
-
121
- ## 💖 Support
122
-
123
- If you find my content helpful or interesting, consider buying me a coffee. Every cup is greatly appreciated and fuels my work!
124
-
125
- [![Buy Me a Coffee](https://img.shields.io/badge/-buy_me_a%C2%A0coffee-gray?logo=buy-me-a-coffee)](https://buymeacoffee.com/thecyberlocal)
126
- [![PayPal](https://img.shields.io/badge/PayPal-00457C?logo=paypal&logoColor=white)](https://www.paypal.com/paypalme/TheCyberLocal)
127
- [![Venmo](https://img.shields.io/badge/Venmo-008CFF?logo=venmo&logoColor=white)](https://www.venmo.com/TheCyberLocal)
strling-2.5.3/README.md DELETED
@@ -1,128 +0,0 @@
1
- # STRling
2
-
3
- ## 🗺️ [Project Overview](https://github.com/TheCyberLocal/STRling)
4
-
5
-
6
- <table>
7
- <tr>
8
- <td style="padding: 10px;"><img src="https://github.com/TheCyberLocal/STRling/blob/main/STRling-Logo.jpg" alt="" /></td>
9
- <td style="padding: 10px;">STRling is a next-generation production-grade syntax designed as a user interface for writing powerful regular expressions (RegEx) with an object-oriented approach and instructional error handling. STRling recognizes the cryptic nature of raw regular expression is challenging and susceptible to errors, which is why STRling keeps it as far from you as possible while maintaining the same power and flexibility. String validation should be simple and enjoyable, not a hassle. Best of all, STRling syntax is built upon the RegEx engine, making it fully compatible with all libraries that accept RegEx along with the traditional built-in RegEx methods.</td>
10
- </tr>
11
- </table>
12
-
13
- ## 🗝️ Key Features
14
-
15
- 1. **Beginner Friendly:** You need ZERO knowledge of RegEx jargon to create powerful and clear-to-read patterns.
16
- 2. **Reliable Logic:** STRling exclusively utilizes built-in libraries, making it a reliable package.
17
- 3. **Instructional Error Handling:** Errors inevitably occur by drafting invalid patterns, so STRling explains to the developer exactly what was done wrong and how to correct it.
18
- 4. **Consistent and Readable:** Make your projects clear and consistent by using STRling rather than the individual library string validators that each have their own syntax (Sqlite3, Sequelize, Postgres, WTForms... etc.).
19
- 5. **Multilingual Availability:** STRling is not just a package, but a concept brought to you through multiple widely used languages.
20
-
21
- These key features collectively emphasize and fortify the claim that STRling truly is a next-generation production-grade syntax for pattern handling.
22
-
23
- ## 🎯 Project Mission
24
-
25
- Our mission is to make RegEx a distant and outdated syntax by abstracting the complexities of RegEx into a clean, readable, and powerful interface. We strive to simplify string operations and ensure that developers can focus on building their applications without the steep learning curve of traditional RegEx. The previous alternative to RegEx was to learn the string validation syntax specific to each user input library, but STRling aims to unify the disparate syntaxes found across various libraries and frameworks into one simple library using only built-in packages.
26
-
27
- ## 💾 Installation
28
-
29
- Install STRling via pip:
30
-
31
- ```sh
32
- pip install STRling
33
- ```
34
-
35
- ## ✨ STRling in action!
36
-
37
- ### 📑 [STRling Documentation](./docs/strling_docs.md)
38
-
39
- ```python
40
- from STRling import simply as s
41
- import re
42
-
43
-
44
- # Let's make a phone number pattern for the formats below:
45
- # - (123) 456-7890
46
- # - 123-456-7890
47
- # - 123 456 7890
48
- # - 1234567890
49
-
50
- # Separator: either space or hyphen
51
- separator = s.in_chars(' -')
52
-
53
- # Optional area code part: 123 even if in parenthesis like (123)
54
- area_code = s.merge( # notice we use merge since we don't want to name the group with parenthesis
55
- s.may('('), # Optional opening parenthesis
56
- s.group('area_code', s.digit(3)), # Exactly 3 digits and named for later reference
57
- s.may(')') # Optional closing parenthesis
58
- )
59
-
60
- # Central part: 456
61
- central_part = s.group('central_part', s.digit(3)) # Exactly 3 digits and named for later reference
62
-
63
- # Last part: 7890
64
- last_part = s.group("last_part", s.digit(4)) # Exactly 4 digits and named for later reference
65
-
66
- # Combine all parts into the final phone number pattern
67
- # Notice we don't name the whole pattern since we can already reference it
68
- phone_number_pattern = s.merge(
69
- area_code, # Area code part
70
- s.may(separator), # Optional separator after area code
71
- central_part, # Central 3 digits
72
- s.may(separator), # Optional separator after area code
73
- last_part # Last part with hyphen and 4 digits
74
- )
75
-
76
- # Example usage
77
- # Note: To make a pattern a RegEx string compatible with other engines use `str(pattern)`.
78
- example_text = "(123) 456-7890 and 123-456-7890"
79
- pattern = re.compile(str(phone_number_pattern)) # Notice str(pattern)
80
- matches = pattern.finditer(example_text)
81
-
82
- for match in matches:
83
- print("Full Match:", match.group())
84
- print("Area Code:", match.group("area_code"))
85
- print("Central Part:", match.group("central_part"))
86
- print("Last Part:", match.group("last_part"))
87
- print()
88
-
89
- # Output:
90
- # Full Match: (123) 456-7890
91
- # Area Code: 123
92
- # Central Part: 456
93
- # Last Part: 7890
94
-
95
- # Full Match: 123-456-7890
96
- # Area Code: 123
97
- # Central Part: 456
98
- # Last Part: 7890
99
- ```
100
-
101
- Simplify your string validation and matching tasks with STRling, the all-in-one solution for developers who need a powerful yet user-friendly tool for working with strings. No longer write RegEx using complex jargon or the various syntaxes string validation specific to independent libraries. Download and start using STRling today!
102
-
103
- ## 🌎 Locations
104
-
105
- ### STRling for Python
106
-
107
- [![](https://img.shields.io/pypi/v/STRling?color=blue&logo=pypi)](https://pypi.org/project/STRling/)
108
- [![](https://img.shields.io/badge/GitHub-black?logo=github&logoColor=white)](https://github.com/TheCyberLocal/STRling-Py)
109
-
110
- ### STRling for JavaScript
111
-
112
- [![](https://img.shields.io/npm/v/@thecyberlocal/strling?color=blue&logo=npm)](https://www.npmjs.com/package/@thecyberlocal/strling)
113
- [![](https://img.shields.io/badge/GitHub-black?logo=github&logoColor=white)](https://github.com/TheCyberLocal/STRling-JS)
114
-
115
- ## 🌐 Socials
116
-
117
- [![LinkedIn](https://img.shields.io/badge/LinkedIn-%230077B5.svg?logo=linkedin&logoColor=white)](https://linkedin.com/in/tzm01)
118
- [![GitHub](https://img.shields.io/badge/GitHub-black?logo=github&logoColor=white)](https://github.com/TheCyberLocal)
119
- [![PyPI](https://img.shields.io/badge/PyPI-3776AB?logo=pypi&logoColor=white)](https://pypi.org/user/TheCyberLocal/)
120
- [![npm](https://img.shields.io/badge/npm-%23FFFFFF.svg?logo=npm&logoColor=D00000)](https://www.npmjs.com/~thecyberlocal)
121
-
122
- ## 💖 Support
123
-
124
- If you find my content helpful or interesting, consider buying me a coffee. Every cup is greatly appreciated and fuels my work!
125
-
126
- [![Buy Me a Coffee](https://img.shields.io/badge/-buy_me_a%C2%A0coffee-gray?logo=buy-me-a-coffee)](https://buymeacoffee.com/thecyberlocal)
127
- [![PayPal](https://img.shields.io/badge/PayPal-00457C?logo=paypal&logoColor=white)](https://www.paypal.com/paypalme/TheCyberLocal)
128
- [![Venmo](https://img.shields.io/badge/Venmo-008CFF?logo=venmo&logoColor=white)](https://www.venmo.com/TheCyberLocal)
@@ -1,127 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: STRling
3
- Version: 2.5.3
4
- Description-Content-Type: text/markdown
5
-
6
- # STRling
7
-
8
- ## 🗺️ [Project Overview](https://github.com/TheCyberLocal/STRling)
9
-
10
- STRling is a next-generation production-grade syntax designed as a user interface for writing powerful regular expressions (RegEx) with an object-oriented approach and instructional error handling. STRling recognizes the cryptic nature of raw regular expression is challenging and susceptible to errors, which is why STRling keeps it as far from you as possible while maintaining the same power and flexibility. String validation should be simple and enjoyable, not a hassle. Best of all, STRling syntax is built upon the RegEx engine, making it fully compatible with all libraries that accept RegEx along with the traditional built-in RegEx methods.
11
-
12
- ## 🗝️ Key Features
13
-
14
- 1. **Beginner Friendly:** You need ZERO knowledge of RegEx jargon to create powerful and clear-to-read patterns.
15
- 2. **Reliable Logic:** STRling exclusively utilizes built-in libraries, making it a reliable package.
16
- 3. **Instructional Error Handling:** Errors inevitably occur by drafting invalid patterns, so STRling explains to the developer exactly what was done wrong and how to correct it.
17
- 4. **Consistent and Readable:** Make your projects clear and consistent by using STRling rather than the individual library string validators that each have their own syntax (Sqlite3, Sequelize, Postgres, WTForms... etc.).
18
- 5. **Multilingual Availability:** STRling is not just a package, but a concept brought to you through multiple widely used languages.
19
-
20
- These key features collectively emphasize and fortify the claim that STRling truly is a next-generation production-grade syntax for pattern handling.
21
-
22
- ## 🎯 Project Mission
23
-
24
- Our mission is to make RegEx a distant and outdated syntax by abstracting the complexities of RegEx into a clean, readable, and powerful interface. We strive to simplify string operations and ensure that developers can focus on building their applications without the steep learning curve of traditional RegEx. The previous alternative to RegEx was to learn the string validation syntax specific to each user input library, but STRling aims to unify the disparate syntaxes found across various libraries and frameworks into one simple library using only built-in packages.
25
-
26
- ## 💾 Installation
27
-
28
- Install STRling via pip:
29
-
30
- ```sh
31
- pip install STRling
32
- ```
33
-
34
- ## ✨ STRling in action!
35
-
36
- ### 📑 [STRling Documentation on GitHub](https://github.com/TheCyberLocal/STRling-Py/blob/main/docs/strling_docs.md)
37
-
38
- ```python
39
- from STRling import simply as s
40
- import re
41
-
42
-
43
- # Let's make a phone number pattern for the formats below:
44
- # - (123) 456-7890
45
- # - 123-456-7890
46
- # - 123 456 7890
47
- # - 1234567890
48
-
49
- # Separator: either space or hyphen
50
- separator = s.in_chars(' -')
51
-
52
- # Optional area code part: 123 even if in parenthesis like (123)
53
- area_code = s.merge( # notice we use merge since we don't want to name the group with parenthesis
54
- s.may('('), # Optional opening parenthesis
55
- s.group('area_code', s.digit(3)), # Exactly 3 digits and named for later reference
56
- s.may(')') # Optional closing parenthesis
57
- )
58
-
59
- # Central part: 456
60
- central_part = s.group('central_part', s.digit(3)) # Exactly 3 digits and named for later reference
61
-
62
- # Last part: 7890
63
- last_part = s.group("last_part", s.digit(4)) # Exactly 4 digits and named for later reference
64
-
65
- # Combine all parts into the final phone number pattern
66
- # Notice we don't name the whole pattern since we can already reference it
67
- phone_number_pattern = s.merge(
68
- area_code, # Area code part
69
- s.may(separator), # Optional separator after area code
70
- central_part, # Central 3 digits
71
- s.may(separator), # Optional separator after area code
72
- last_part # Last part with hyphen and 4 digits
73
- )
74
-
75
- # Example usage
76
- # Note: To make a pattern a RegEx string compatible with other engines use `str(pattern)`.
77
- example_text = "(123) 456-7890 and 123-456-7890"
78
- pattern = re.compile(str(phone_number_pattern)) # Notice str(pattern)
79
- matches = pattern.finditer(example_text)
80
-
81
- for match in matches:
82
- print("Full Match:", match.group())
83
- print("Area Code:", match.group("area_code"))
84
- print("Central Part:", match.group("central_part"))
85
- print("Last Part:", match.group("last_part"))
86
- print()
87
-
88
- # Output:
89
- # Full Match: (123) 456-7890
90
- # Area Code: 123
91
- # Central Part: 456
92
- # Last Part: 7890
93
-
94
- # Full Match: 123-456-7890
95
- # Area Code: 123
96
- # Central Part: 456
97
- # Last Part: 7890
98
- ```
99
-
100
- Simplify your string validation and matching tasks with STRling, the all-in-one solution for developers who need a powerful yet user-friendly tool for working with strings. No longer write RegEx using complex jargon or the various syntaxes string validation specific to independent libraries. Download and start using STRling today!
101
-
102
- ## 🌎 Locations
103
-
104
- ### STRling for Python
105
-
106
- [![](https://img.shields.io/pypi/v/STRling?color=blue&logo=pypi)](https://pypi.org/project/STRling/)
107
- [![](https://img.shields.io/badge/GitHub-black?logo=github&logoColor=white)](https://github.com/TheCyberLocal/STRling-Py)
108
-
109
- ### STRling for JavaScript
110
-
111
- [![](https://img.shields.io/npm/v/@thecyberlocal/strling?color=blue&logo=npm)](https://www.npmjs.com/package/@thecyberlocal/strling)
112
- [![](https://img.shields.io/badge/GitHub-black?logo=github&logoColor=white)](https://github.com/TheCyberLocal/STRling-JS)
113
-
114
- ## 🌐 Socials
115
-
116
- [![LinkedIn](https://img.shields.io/badge/LinkedIn-%230077B5.svg?logo=linkedin&logoColor=white)](https://linkedin.com/in/tzm01)
117
- [![GitHub](https://img.shields.io/badge/GitHub-black?logo=github&logoColor=white)](https://github.com/TheCyberLocal)
118
- [![PyPI](https://img.shields.io/badge/PyPI-3776AB?logo=pypi&logoColor=white)](https://pypi.org/user/TheCyberLocal/)
119
- [![npm](https://img.shields.io/badge/npm-%23FFFFFF.svg?logo=npm&logoColor=D00000)](https://www.npmjs.com/~thecyberlocal)
120
-
121
- ## 💖 Support
122
-
123
- If you find my content helpful or interesting, consider buying me a coffee. Every cup is greatly appreciated and fuels my work!
124
-
125
- [![Buy Me a Coffee](https://img.shields.io/badge/-buy_me_a%C2%A0coffee-gray?logo=buy-me-a-coffee)](https://buymeacoffee.com/thecyberlocal)
126
- [![PayPal](https://img.shields.io/badge/PayPal-00457C?logo=paypal&logoColor=white)](https://www.paypal.com/paypalme/TheCyberLocal)
127
- [![Venmo](https://img.shields.io/badge/Venmo-008CFF?logo=venmo&logoColor=white)](https://www.venmo.com/TheCyberLocal)
strling-2.5.3/setup.py DELETED
@@ -1,20 +0,0 @@
1
- # pip install setuptools wheel twine
2
- # python setup.py sdist bdist_wheel
3
- # twine upload dist/*
4
- from setuptools import setup, find_packages
5
-
6
-
7
- with open('./docs/pypi_docs.md', 'r') as f:
8
- description = f.read()
9
-
10
- setup(
11
- name='STRling',
12
- version='2.5.3',
13
- packages=find_packages(),
14
- install_requires=[
15
- # Add dependencies here.
16
- # e.g. 'numpy>=1.11.1'
17
- ],
18
- long_description=description,
19
- long_description_content_type='text/markdown',
20
- )
File without changes
File without changes
File without changes