STRling 2.4.4__tar.gz → 2.5.1__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.
@@ -1,26 +1,27 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: STRling
3
- Version: 2.4.4
3
+ Version: 2.5.1
4
4
  Description-Content-Type: text/markdown
5
5
 
6
6
  # STRling
7
7
 
8
- ## 🗺️ Project Overview
8
+ ## 🗺️ [Project Overview](https://github.com/TheCyberLocal/STRling)
9
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 can be challenging and susceptibility to errors, which is why STRling looks and feels nothing like RegEx 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 RegEx methods built-in to Python.
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
11
 
12
12
  ## 🗝️ Key Features
13
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 python libraries, making it a reliable package.
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
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
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.
18
19
 
19
- These key features collectively emphasis and fortify the claim that STRling truly is a next-generation production-grade syntax for pattern handling.
20
+ These key features collectively emphasize and fortify the claim that STRling truly is a next-generation production-grade syntax for pattern handling.
20
21
 
21
22
  ## 🎯 Project Mission
22
23
 
23
- 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 Python packages.
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.
24
25
 
25
26
  ## 💾 Installation
26
27
 
@@ -1,21 +1,22 @@
1
1
  # STRling
2
2
 
3
- ## 🗺️ Project Overview
3
+ ## 🗺️ [Project Overview](https://github.com/TheCyberLocal/STRling)
4
4
 
5
- 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 can be challenging and susceptibility to errors, which is why STRling looks and feels nothing like RegEx 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 RegEx methods built-in to Python.
5
+ 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.
6
6
 
7
7
  ## 🗝️ Key Features
8
8
 
9
- 1. **Beginner Friendly:** You need ZERO knowledge of RegEx jargon to create powerful and clear to read patterns.
10
- 2. **Reliable Logic:** STRling exclusively utilizes built-in python libraries, making it a reliable package.
9
+ 1. **Beginner Friendly:** You need ZERO knowledge of RegEx jargon to create powerful and clear-to-read patterns.
10
+ 2. **Reliable Logic:** STRling exclusively utilizes built-in libraries, making it a reliable package.
11
11
  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.
12
12
  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.).
13
+ 5. **Multilingual Availability:** STRling is not just a package, but a concept brought to you through multiple widely used languages.
13
14
 
14
- These key features collectively emphasis and fortify the claim that STRling truly is a next-generation production-grade syntax for pattern handling.
15
+ These key features collectively emphasize and fortify the claim that STRling truly is a next-generation production-grade syntax for pattern handling.
15
16
 
16
17
  ## 🎯 Project Mission
17
18
 
18
- 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 Python packages.
19
+ 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.
19
20
 
20
21
  ## 💾 Installation
21
22
 
@@ -94,21 +95,26 @@ for match in matches:
94
95
  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!
95
96
 
96
97
  ## 🌎 Locations
98
+
97
99
  ### STRling for Python
100
+
98
101
  [![](https://img.shields.io/pypi/v/STRling?color=blue&logo=pypi)](https://pypi.org/project/STRling/)
99
102
  [![](https://img.shields.io/badge/GitHub-black?logo=github&logoColor=white)](https://github.com/TheCyberLocal/STRling-Py)
100
103
 
101
104
  ### STRling for JavaScript
105
+
102
106
  [![](https://img.shields.io/npm/v/@thecyberlocal/strling?color=blue&logo=npm)](https://www.npmjs.com/package/@thecyberlocal/strling)
103
107
  [![](https://img.shields.io/badge/GitHub-black?logo=github&logoColor=white)](https://github.com/TheCyberLocal/STRling-JS)
104
108
 
105
109
  ## 🌐 Socials
110
+
106
111
  [![LinkedIn](https://img.shields.io/badge/LinkedIn-%230077B5.svg?logo=linkedin&logoColor=white)](https://linkedin.com/in/tzm01)
107
112
  [![GitHub](https://img.shields.io/badge/GitHub-black?logo=github&logoColor=white)](https://github.com/TheCyberLocal)
108
113
  [![PyPI](https://img.shields.io/badge/PyPI-3776AB?logo=pypi&logoColor=white)](https://pypi.org/user/TheCyberLocal/)
109
114
  [![npm](https://img.shields.io/badge/npm-%23FFFFFF.svg?logo=npm&logoColor=D00000)](https://www.npmjs.com/~thecyberlocal)
110
115
 
111
116
  ## 💖 Support
117
+
112
118
  If you find my content helpful or interesting, consider buying me a coffee. Every cup is greatly appreciated and fuels my work!
113
119
 
114
120
  [![Buy Me a Coffee](https://img.shields.io/badge/-buy_me_a%C2%A0coffee-gray?logo=buy-me-a-coffee)](https://buymeacoffee.com/thecyberlocal)
@@ -128,3 +128,67 @@ def not_behind(pattern):
128
128
  raise STRlingError(message)
129
129
 
130
130
  return Pattern(f'(?<!{pattern})', composite=True)
131
+
132
+ def has(pattern):
133
+ """
134
+ A lookaround that checks for the presence of the specified pattern anywhere in the string without including it in the result.
135
+
136
+ Parameters:
137
+ - pattern (Pattern/str): The pattern to look for.
138
+
139
+ Returns:
140
+ - An instance of the Pattern class.
141
+
142
+ Examples:
143
+ ```
144
+ # Only matches if the string contains the pattern.
145
+ my_pattern = s.has(pattern)
146
+ ```
147
+ """
148
+
149
+ if isinstance(pattern, str):
150
+ pattern = lit(pattern)
151
+
152
+ if not isinstance(pattern, Pattern):
153
+ message = """
154
+ Method: simply.has(pattern)
155
+
156
+ The parameter must be an instance of `Pattern` or `str`.
157
+
158
+ Use a string such as "123abc$" to match literal characters, or use a predefined set like `simply.letter()`.
159
+ """
160
+ raise STRlingError(message)
161
+
162
+ return Pattern(f'(?=.*{pattern})', composite=True)
163
+
164
+ def has_not(pattern):
165
+ """
166
+ A lookaround that checks for the absence of the specified pattern everywhere in the string without including it in the result.
167
+
168
+ Parameters:
169
+ - pattern (Pattern/str): The pattern to look for and ensure is absent.
170
+
171
+ Returns:
172
+ - An instance of the Pattern class.
173
+
174
+ Examples:
175
+ ```
176
+ # Only matches if the string doesn't contain the pattern.
177
+ my_pattern = s.has_not(pattern)
178
+ ```
179
+ """
180
+
181
+ if isinstance(pattern, str):
182
+ pattern = lit(pattern)
183
+
184
+ if not isinstance(pattern, Pattern):
185
+ message = """
186
+ Method: simply.has(pattern)
187
+
188
+ The parameter must be an instance of `Pattern` or `str`.
189
+
190
+ Use a string such as "123abc$" to match literal characters, or use a predefined set like `simply.letter()`.
191
+ """
192
+ raise STRlingError(message)
193
+
194
+ return Pattern(f'(?!.*{pattern})', composite=True)
@@ -1,26 +1,27 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: STRling
3
- Version: 2.4.4
3
+ Version: 2.5.1
4
4
  Description-Content-Type: text/markdown
5
5
 
6
6
  # STRling
7
7
 
8
- ## 🗺️ Project Overview
8
+ ## 🗺️ [Project Overview](https://github.com/TheCyberLocal/STRling)
9
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 can be challenging and susceptibility to errors, which is why STRling looks and feels nothing like RegEx 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 RegEx methods built-in to Python.
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
11
 
12
12
  ## 🗝️ Key Features
13
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 python libraries, making it a reliable package.
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
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
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.
18
19
 
19
- These key features collectively emphasis and fortify the claim that STRling truly is a next-generation production-grade syntax for pattern handling.
20
+ These key features collectively emphasize and fortify the claim that STRling truly is a next-generation production-grade syntax for pattern handling.
20
21
 
21
22
  ## 🎯 Project Mission
22
23
 
23
- 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 Python packages.
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.
24
25
 
25
26
  ## 💾 Installation
26
27
 
@@ -9,7 +9,7 @@ with open('./docs/pypi_docs.md', 'r') as f:
9
9
 
10
10
  setup(
11
11
  name='STRling',
12
- version='2.4.4',
12
+ version='2.5.1',
13
13
  packages=find_packages(),
14
14
  install_requires=[
15
15
  # Add dependencies here.
File without changes
File without changes
File without changes