osbot-utils 2.71.0__py3-none-any.whl → 2.73.0__py3-none-any.whl
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.
- osbot_utils/helpers/safe_str/Safe_Str.py +39 -18
- osbot_utils/helpers/safe_str/Safe_Str__Version.py +20 -0
- osbot_utils/helpers/safe_str/http/Safe_Str__IP_Address.py +29 -0
- osbot_utils/helpers/safe_str/schemas/Enum__Safe_Str__Regex_Mode.py +5 -0
- osbot_utils/helpers/safe_str/schemas/__init__.py +0 -0
- osbot_utils/testing/Temp_Web_Server.py +10 -11
- osbot_utils/utils/Http.py +7 -12
- osbot_utils/version +1 -1
- osbot_utils-2.73.0.dist-info/METADATA +212 -0
- {osbot_utils-2.71.0.dist-info → osbot_utils-2.73.0.dist-info}/RECORD +12 -8
- osbot_utils-2.71.0.dist-info/METADATA +0 -44
- {osbot_utils-2.71.0.dist-info → osbot_utils-2.73.0.dist-info}/LICENSE +0 -0
- {osbot_utils-2.71.0.dist-info → osbot_utils-2.73.0.dist-info}/WHEEL +0 -0
@@ -1,19 +1,22 @@
|
|
1
1
|
import re
|
2
|
-
from typing
|
3
|
-
from osbot_utils.
|
2
|
+
from typing import Optional
|
3
|
+
from osbot_utils.helpers.safe_str.schemas.Enum__Safe_Str__Regex_Mode import Enum__Safe_Str__Regex_Mode
|
4
|
+
from osbot_utils.type_safe.Type_Safe__Primitive import Type_Safe__Primitive
|
4
5
|
|
5
6
|
TYPE_SAFE__STR__REGEX__SAFE_STR = re.compile(r'[^a-zA-Z0-9]') # Only allow alphanumerics and numbers
|
6
7
|
TYPE_SAFE__STR__MAX_LENGTH = 512
|
7
8
|
|
9
|
+
|
8
10
|
class Safe_Str(Type_Safe__Primitive, str):
|
9
|
-
max_length : int
|
10
|
-
regex : re.Pattern
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
11
|
+
max_length : int = TYPE_SAFE__STR__MAX_LENGTH
|
12
|
+
regex : re.Pattern = TYPE_SAFE__STR__REGEX__SAFE_STR
|
13
|
+
regex_mode : Enum__Safe_Str__Regex_Mode = Enum__Safe_Str__Regex_Mode.REPLACE
|
14
|
+
replacement_char : str = '_'
|
15
|
+
allow_empty : bool = True
|
16
|
+
trim_whitespace : bool = False
|
17
|
+
allow_all_replacement_char: bool = True
|
18
|
+
strict_validation : bool = False # If True, don't replace invalid chars, raise an error instead
|
19
|
+
exact_length : bool = False # If True, require exact length match, not just max length
|
17
20
|
|
18
21
|
|
19
22
|
def __new__(cls, value: Optional[str] = None) -> 'Safe_Str':
|
@@ -41,14 +44,32 @@ class Safe_Str(Type_Safe__Primitive, str):
|
|
41
44
|
if cls.allow_empty and value =='':
|
42
45
|
return str.__new__(cls, '')
|
43
46
|
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
47
|
+
sanitized_value = cls.validate_and_sanitize(value)
|
48
|
+
|
49
|
+
|
50
|
+
return str.__new__(cls, sanitized_value)
|
51
|
+
|
52
|
+
@classmethod
|
53
|
+
def validate_and_sanitize(cls, value):
|
54
|
+
if cls.strict_validation:
|
55
|
+
if cls.regex_mode == Enum__Safe_Str__Regex_Mode.MATCH: # For 'match' mode, regex defines the valid pattern (like version numbers)
|
56
|
+
if not cls.regex.match(value):
|
57
|
+
raise ValueError(f"Value does not match required pattern: {cls.regex.pattern}")
|
58
|
+
return value
|
59
|
+
elif cls.regex_mode == Enum__Safe_Str__Regex_Mode.REPLACE: # For 'replace' mode, regex defines invalid characters to replace
|
60
|
+
if cls.regex.search(value) is not None:
|
61
|
+
raise ValueError(f"Value contains invalid characters (must not match pattern: {cls.regex.pattern})")
|
62
|
+
return value
|
63
|
+
else:
|
64
|
+
raise ValueError(f"in {cls.__name__}, regex_mode value cannot be None when strict_validation is True")
|
48
65
|
else:
|
49
|
-
|
66
|
+
if cls.regex_mode == Enum__Safe_Str__Regex_Mode.MATCH: # Cannot do replacement when regex defines valid pattern
|
67
|
+
raise ValueError(f"Cannot use regex_mode='match' without strict_validation=True")
|
68
|
+
else: # assume the default Enum__Safe_Str__Regex_Mode.MATCH
|
69
|
+
sanitized_value = cls.regex.sub(cls.replacement_char, value)
|
50
70
|
|
51
|
-
|
52
|
-
|
71
|
+
if not cls.allow_all_replacement_char and set(sanitized_value) == {
|
72
|
+
cls.replacement_char} and sanitized_value:
|
73
|
+
raise ValueError(f"Sanitized value consists entirely of '{cls.replacement_char}' characters")
|
53
74
|
|
54
|
-
|
75
|
+
return sanitized_value
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import re
|
2
|
+
from osbot_utils.helpers.safe_str.Safe_Str import Safe_Str
|
3
|
+
from osbot_utils.helpers.safe_str.schemas.Enum__Safe_Str__Regex_Mode import Enum__Safe_Str__Regex_Mode
|
4
|
+
|
5
|
+
TYPE_SAFE_STR__VERSION__REGEX = re.compile(r'^v(\d{1,3})\.(\d{1,3})\.(\d{1,3})$') # Regex to match versions like v0.1.1 or v999.999.999
|
6
|
+
TYPE_SAFE_STR__VERSION__MAX_LENGTH = 12 # Max length for 'v999.999.999'
|
7
|
+
|
8
|
+
class Safe_Str__Version(Safe_Str):
|
9
|
+
regex = TYPE_SAFE_STR__VERSION__REGEX
|
10
|
+
regex_mode = Enum__Safe_Str__Regex_Mode.MATCH # in this case we need an exact match of the version regex
|
11
|
+
max_length = TYPE_SAFE_STR__VERSION__MAX_LENGTH
|
12
|
+
allow_empty = False
|
13
|
+
trim_whitespace = True
|
14
|
+
strict_validation = True # Ensure the value exactly matches the regex
|
15
|
+
|
16
|
+
def __add__(self, other): # Concatenation returns regular str, not Safe_Str__Version
|
17
|
+
return str.__add__(self, other)
|
18
|
+
|
19
|
+
def __radd__(self, other): # Reverse concatenation also returns regular str
|
20
|
+
return str.__add__(other, self)
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import ipaddress
|
2
|
+
from osbot_utils.type_safe.Type_Safe__Primitive import Type_Safe__Primitive
|
3
|
+
|
4
|
+
|
5
|
+
class Safe_Str__IP_Address(Type_Safe__Primitive, str):
|
6
|
+
|
7
|
+
def __new__(cls, value: str = None):
|
8
|
+
if value is not None: # check that it is not None
|
9
|
+
if not isinstance(value, str): # check that it is a string
|
10
|
+
raise TypeError(f"Value provided must be a string, and it was {type(value)}")
|
11
|
+
else:
|
12
|
+
value = value.strip() # trim/strip the value since there could be some leading spaces (which are easy to fix here)
|
13
|
+
|
14
|
+
if not value: # allow empty or null values
|
15
|
+
return str.__new__(cls, "")
|
16
|
+
|
17
|
+
try:
|
18
|
+
ip_obj = ipaddress.ip_address(value) # validate IP address using ipaddress module
|
19
|
+
value = str(ip_obj) # Use the canonical representation
|
20
|
+
except ValueError as e:
|
21
|
+
raise ValueError(f"Invalid IP address: {value}") from e
|
22
|
+
|
23
|
+
return str.__new__(cls, value)
|
24
|
+
|
25
|
+
def __add__(self, other): # Concatenation returns regular str, not Safe_Str__IP_Address
|
26
|
+
return str.__add__(self, other)
|
27
|
+
|
28
|
+
def __radd__(self, other): # Reverse concatenation also returns regular str"""
|
29
|
+
return str.__add__(other, self)
|
File without changes
|
@@ -1,14 +1,11 @@
|
|
1
|
-
from contextlib
|
2
|
-
from functools
|
3
|
-
from http.server
|
4
|
-
from threading
|
5
|
-
from urllib.parse
|
6
|
-
|
7
|
-
from osbot_utils.utils.
|
8
|
-
|
9
|
-
from osbot_utils.utils.Misc import random_port, random_string
|
10
|
-
|
11
|
-
from osbot_utils.utils.Http import port_is_open, GET
|
1
|
+
from contextlib import contextmanager
|
2
|
+
from functools import partial
|
3
|
+
from http.server import SimpleHTTPRequestHandler, ThreadingHTTPServer
|
4
|
+
from threading import Thread
|
5
|
+
from urllib.parse import urljoin
|
6
|
+
from osbot_utils.utils.Files import file_create, path_combine, temp_filename, file_create_all_parent_folders
|
7
|
+
from osbot_utils.utils.Misc import random_port, random_string
|
8
|
+
from osbot_utils.utils.Http import port_is_open, GET
|
12
9
|
|
13
10
|
|
14
11
|
class Temp_Web_Server:
|
@@ -67,6 +64,7 @@ class Temp_Web_Server:
|
|
67
64
|
self.server_thread.join()
|
68
65
|
else:
|
69
66
|
self.server._BaseServer__shutdown_request = True # simulate what happens inside self.server.shutdown()
|
67
|
+
return self
|
70
68
|
|
71
69
|
def start(self):
|
72
70
|
if self.http_handler is SimpleHTTPRequestHandler:
|
@@ -76,6 +74,7 @@ class Temp_Web_Server:
|
|
76
74
|
self.server = ThreadingHTTPServer((self.host, self.port), handler_config)
|
77
75
|
self.server_thread = Thread(target=self.server.serve_forever, name=self.server_name)
|
78
76
|
self.server_thread.start()
|
77
|
+
return self
|
79
78
|
|
80
79
|
def url(self,path=''):
|
81
80
|
base_url = f"http://{self.host}:{self.port}"
|
osbot_utils/utils/Http.py
CHANGED
@@ -1,20 +1,15 @@
|
|
1
1
|
import json
|
2
|
-
import os
|
3
2
|
import re
|
4
3
|
import socket
|
5
4
|
import ssl
|
6
5
|
import unicodedata
|
7
|
-
from http.cookies
|
8
|
-
from time
|
9
|
-
from urllib.parse
|
10
|
-
from urllib.request
|
11
|
-
|
12
|
-
from osbot_utils.utils.
|
13
|
-
|
14
|
-
from osbot_utils.utils.Misc import url_decode
|
15
|
-
|
16
|
-
from osbot_utils.utils.Files import save_bytes_as_file, file_size, file_bytes, file_open_bytes, file_create
|
17
|
-
from osbot_utils.utils.Python_Logger import Python_Logger
|
6
|
+
from http.cookies import SimpleCookie
|
7
|
+
from time import sleep
|
8
|
+
from urllib.parse import quote, urljoin, urlparse
|
9
|
+
from urllib.request import Request, urlopen
|
10
|
+
from osbot_utils.utils.Str import html_decode
|
11
|
+
from osbot_utils.utils.Misc import url_decode
|
12
|
+
from osbot_utils.utils.Files import save_bytes_as_file, file_create
|
18
13
|
|
19
14
|
URL_CHECK_HOST_ONLINE = 'https://www.google.com'
|
20
15
|
URL_JOIN_SAFE__MAX_ITERATIONS = 5
|
osbot_utils/version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
v2.
|
1
|
+
v2.73.0
|
@@ -0,0 +1,212 @@
|
|
1
|
+
Metadata-Version: 2.3
|
2
|
+
Name: osbot_utils
|
3
|
+
Version: 2.73.0
|
4
|
+
Summary: OWASP Security Bot - Utils
|
5
|
+
License: MIT
|
6
|
+
Author: Dinis Cruz
|
7
|
+
Author-email: dinis.cruz@owasp.org
|
8
|
+
Requires-Python: >=3.7,<4.0
|
9
|
+
Classifier: License :: OSI Approved :: MIT License
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
11
|
+
Classifier: Programming Language :: Python :: 3.7
|
12
|
+
Classifier: Programming Language :: Python :: 3.8
|
13
|
+
Classifier: Programming Language :: Python :: 3.9
|
14
|
+
Classifier: Programming Language :: Python :: 3.10
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
18
|
+
Project-URL: Homepage, https://github.com/owasp-sbot/OSBot-Utils
|
19
|
+
Project-URL: Repository, https://github.com/owasp-sbot/OSBot-Utils
|
20
|
+
Description-Content-Type: text/markdown
|
21
|
+
|
22
|
+
# OSBot-Utils
|
23
|
+
|
24
|
+

|
25
|
+

|
26
|
+

|
27
|
+

|
28
|
+
[](https://codecov.io/gh/owasp-sbot/OSBot-Utils)
|
29
|
+
|
30
|
+
A comprehensive Python utility toolkit providing **Type-Safe primitives**, decorators, caching layers, HTML/AST helpers, SQLite tooling, SSH execution, LLM request pipelines, tracing, and more — all designed to accelerate building robust, maintainable automation and integration code.
|
31
|
+
|
32
|
+
---
|
33
|
+
|
34
|
+
## ✨ Key Features
|
35
|
+
|
36
|
+
* **🛡️ Type-Safe First**: Strongly typed primitives (`Safe_Str`, `Safe_Int`, `Safe_Float`, etc.) with validation and sanitization
|
37
|
+
* **⚡ Multi-layer Caching**: In-memory, per-instance, pickle-on-disk, temp-file, and request/response caches
|
38
|
+
* **🗂️ Rich Utilities**: Helpers for HTML parsing/rendering, AST inspection, SSH/SCP execution, SQLite schema management, and more
|
39
|
+
* **🧠 LLM Support**: Structured request builders, OpenAI API integration, schema enforcement, and persistent cache
|
40
|
+
* **🔍 Tracing & Debugging**: Full function call tracing with configurable depth, locals capture, and pretty output
|
41
|
+
* **🧪 Testing Utilities**: Temp SQLite DBs, mockable caches, and easy test helpers
|
42
|
+
|
43
|
+
---
|
44
|
+
|
45
|
+
## 📦 Installation
|
46
|
+
|
47
|
+
```bash
|
48
|
+
pip install osbot-utils
|
49
|
+
```
|
50
|
+
|
51
|
+
From source:
|
52
|
+
|
53
|
+
```bash
|
54
|
+
pip install git+https://github.com/owasp-sbot/OSBot-Utils.git@dev
|
55
|
+
```
|
56
|
+
|
57
|
+
---
|
58
|
+
|
59
|
+
## 🚀 Quick Start
|
60
|
+
|
61
|
+
### Using Type-Safe Primitives
|
62
|
+
|
63
|
+
```python
|
64
|
+
from osbot_utils.helpers.safe_str.Safe_Str import Safe_Str
|
65
|
+
|
66
|
+
class Username(Safe_Str):
|
67
|
+
max_length = 20
|
68
|
+
|
69
|
+
print(Username("alice")) # 'alice'
|
70
|
+
print(Username("invalid username!")) # 'invalid_username_'
|
71
|
+
```
|
72
|
+
|
73
|
+
---
|
74
|
+
|
75
|
+
### Simple In-Memory Caching
|
76
|
+
|
77
|
+
```python
|
78
|
+
from osbot_utils.decorators.methods.cache_on_self import cache_on_self
|
79
|
+
|
80
|
+
class DataFetcher:
|
81
|
+
@cache_on_self
|
82
|
+
def fetch(self, x):
|
83
|
+
print("Fetching…")
|
84
|
+
return x * 2
|
85
|
+
|
86
|
+
fetcher = DataFetcher()
|
87
|
+
fetcher.fetch(10) # Calls method
|
88
|
+
fetcher.fetch(10) # Returns cached result
|
89
|
+
```
|
90
|
+
|
91
|
+
---
|
92
|
+
|
93
|
+
### HTML Parsing
|
94
|
+
|
95
|
+
```python
|
96
|
+
from osbot_utils.helpers.html.Html__To__Html_Dict import html_to_dict
|
97
|
+
|
98
|
+
html_code = "<html><body><h1>Hello</h1></body></html>"
|
99
|
+
print(html_to_dict(html_code))
|
100
|
+
```
|
101
|
+
|
102
|
+
---
|
103
|
+
|
104
|
+
### SQLite Dynamic Table
|
105
|
+
|
106
|
+
```python
|
107
|
+
from osbot_utils.helpers.sqlite.Temp_Sqlite__Table import Temp_Sqlite__Table
|
108
|
+
|
109
|
+
with Temp_Sqlite__Table() as table:
|
110
|
+
table.row_schema = type("Row", (), {"name": str, "age": int})
|
111
|
+
table.create()
|
112
|
+
table.add_row_and_commit(name="Alice", age=30)
|
113
|
+
print(table.rows())
|
114
|
+
```
|
115
|
+
|
116
|
+
---
|
117
|
+
|
118
|
+
### LLM Request Execution
|
119
|
+
|
120
|
+
```python
|
121
|
+
from osbot_utils.helpers.llms.builders.LLM_Request__Builder__Open_AI import LLM_Request__Builder__Open_AI
|
122
|
+
from osbot_utils.helpers.llms.actions.LLM_Request__Execute import LLM_Request__Execute
|
123
|
+
|
124
|
+
builder = LLM_Request__Builder__Open_AI()
|
125
|
+
builder.set__model__gpt_4o().add_message__user("Say hi in JSON")
|
126
|
+
|
127
|
+
executor = LLM_Request__Execute(request_builder=builder)
|
128
|
+
response = executor.execute(builder.llm_request())
|
129
|
+
print(response.response_data)
|
130
|
+
```
|
131
|
+
|
132
|
+
---
|
133
|
+
|
134
|
+
## 🏗️ Architecture
|
135
|
+
|
136
|
+
OSBot-Utils is organized into core **Type-Safe foundations** with layered utilities for different domains:
|
137
|
+
|
138
|
+
```
|
139
|
+
┌──────────────────────────────────────────────┐
|
140
|
+
│ Your Code │
|
141
|
+
│ ┌───────────┐ ┌─────────────┐ ┌──────────┐ │
|
142
|
+
│ │ Type-Safe │ │ Decorators │ │ Helpers │ │
|
143
|
+
│ │ Primitives│ │ & Caching │ │ (HTML, │ │
|
144
|
+
│ │ │ │ │ │ AST, │ │
|
145
|
+
│ │ │ │ │ │ SQLite)│ │
|
146
|
+
│ └───────────┘ └─────────────┘ └──────────┘ │
|
147
|
+
└──────────────────────────┬───────────────────┘
|
148
|
+
│
|
149
|
+
┌──────────────────────────▼───────────────────┐
|
150
|
+
│ OSBot-Utils │
|
151
|
+
│ ┌────────────────────────────────────────┐ │
|
152
|
+
│ │ Type-Safe Core Classes │ │
|
153
|
+
│ │ Validation / Sanitization / Defaults │ │
|
154
|
+
│ └────────────────────────────────────────┘ │
|
155
|
+
│ ┌────────────────────────────────────────┐ │
|
156
|
+
│ │ Caching Layers & Decorators │ │
|
157
|
+
│ │ @cache, @cache_on_self, pickle, tmp │ │
|
158
|
+
│ └────────────────────────────────────────┘ │
|
159
|
+
│ ┌────────────────────────────────────────┐ │
|
160
|
+
│ │ Domain Helpers │ │
|
161
|
+
│ │ HTML, AST, SSH, LLMs, SQLite, Tracing │ │
|
162
|
+
│ └────────────────────────────────────────┘ │
|
163
|
+
└──────────────────────────────────────────────┘
|
164
|
+
```
|
165
|
+
|
166
|
+
---
|
167
|
+
|
168
|
+
## 📚 Key Modules
|
169
|
+
|
170
|
+
* **`helpers/safe_*`** — Type-Safe primitives for validated strings, ints, floats
|
171
|
+
* **`decorators/methods`** — Caching, exception capture, timing, validation
|
172
|
+
* **`helpers/html`** — HTML ↔ dict ↔ tag classes
|
173
|
+
* **`helpers/ast`** — Python AST parsing, visiting, merging
|
174
|
+
* **`helpers/sqlite`** — High-level SQLite APIs, schema generation, temp DBs
|
175
|
+
* **`helpers/ssh`** — SSH/SCP execution with caching
|
176
|
+
* **`helpers/llms`** — LLM request/response handling with caching
|
177
|
+
* **`helpers/trace`** — Function call tracing with configurable output
|
178
|
+
|
179
|
+
---
|
180
|
+
|
181
|
+
## 🎯 Benefits
|
182
|
+
|
183
|
+
### For Developers
|
184
|
+
|
185
|
+
* Strong runtime type validation with Type-Safe classes
|
186
|
+
* Consistent patterns for caching and decorators
|
187
|
+
* Rich helper library to avoid reinventing the wheel
|
188
|
+
|
189
|
+
### For Production
|
190
|
+
|
191
|
+
* Deterministic caching with persistence options
|
192
|
+
* Safe, validated data structures at integration boundaries
|
193
|
+
* Lightweight, dependency-minimal utilities
|
194
|
+
|
195
|
+
### For Teams
|
196
|
+
|
197
|
+
* Standardized approach to cross-cutting concerns (logging, tracing, caching)
|
198
|
+
* Modular helpers to fit many contexts (CLI, web apps, serverless)
|
199
|
+
|
200
|
+
---
|
201
|
+
|
202
|
+
## 🤝 Contributing
|
203
|
+
|
204
|
+
Pull requests are welcome!
|
205
|
+
Check existing patterns in `/helpers` and `/decorators` for style guidance.
|
206
|
+
|
207
|
+
---
|
208
|
+
|
209
|
+
## 📄 License
|
210
|
+
|
211
|
+
Licensed under the Apache 2.0 License.
|
212
|
+
|
@@ -261,20 +261,24 @@ osbot_utils/helpers/safe_int/Safe_UInt__FileSize.py,sha256=pj1_Gf48JVXbnnvx5-Yqb
|
|
261
261
|
osbot_utils/helpers/safe_int/Safe_UInt__Percentage.py,sha256=Ck-jiu6NK57Y3ruAjIJ0k-maiKcB2Q7M3t9nKf-8ga8,357
|
262
262
|
osbot_utils/helpers/safe_int/Safe_UInt__Port.py,sha256=uISrh8VKXiEQULQ1POU9YK8Di6z_vr0HWjCTpjA0YaY,482
|
263
263
|
osbot_utils/helpers/safe_int/__init__.py,sha256=kMU2WMsdQmayBEZugxnJV_wRW3O90bc118sx6iIm_mQ,310
|
264
|
-
osbot_utils/helpers/safe_str/Safe_Str.py,sha256=
|
264
|
+
osbot_utils/helpers/safe_str/Safe_Str.py,sha256=lVrji7bTDzJIRr20tjsKLEZsKVFrx5AlCQnj-pIe32k,4616
|
265
265
|
osbot_utils/helpers/safe_str/Safe_Str__File__Name.py,sha256=9Evl4P45GCyyR2ywze29GzmqWhyTCcgI-o2CItMsOHo,358
|
266
266
|
osbot_utils/helpers/safe_str/Safe_Str__File__Path.py,sha256=K0yBcvH_Ncqiw7tMqjGqaNyWQh1Zs9qxZ-TR8nEIAow,550
|
267
267
|
osbot_utils/helpers/safe_str/Safe_Str__Hash.py,sha256=IpYdYwXey5WZWa6QfysmsiDP-4L-wP-_EKbkeXhFRH4,1252
|
268
268
|
osbot_utils/helpers/safe_str/Safe_Str__Text.py,sha256=QxuWqF8hNYdOPDn3Yac86h_1ZaX-THbTBDakberiJcs,313
|
269
269
|
osbot_utils/helpers/safe_str/Safe_Str__Text__Dangerous.py,sha256=6-fkXBuWgjz70eQicD07f38eEuKqNzJzaFFY6hozhNQ,388
|
270
270
|
osbot_utils/helpers/safe_str/Safe_Str__Url.py,sha256=4l46AAe5Dy_P_W6d-_3pwtXuehG_Wczq1dC5sOOzg_g,549
|
271
|
+
osbot_utils/helpers/safe_str/Safe_Str__Version.py,sha256=atUpMDUbDQWUXUHKkmeMEqSlZGkhNgVInDiOXXQV3kM,1387
|
271
272
|
osbot_utils/helpers/safe_str/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
272
273
|
osbot_utils/helpers/safe_str/http/Safe_Str__Html.py,sha256=4_UxGEIkqV_Zeh77nXoO2OUy5SS6gvN3xSwA32DyWs0,662
|
273
274
|
osbot_utils/helpers/safe_str/http/Safe_Str__Http__Content_Type.py,sha256=HURT4n17LmKbcqODsNwhu_D0lI5LpUL8I5t9aqGAZhQ,516
|
274
275
|
osbot_utils/helpers/safe_str/http/Safe_Str__Http__ETag.py,sha256=5cAfIqebraUnVKZJq3CzXzsFdHGy06TznO36Dc6b5A0,477
|
275
276
|
osbot_utils/helpers/safe_str/http/Safe_Str__Http__Last_Modified.py,sha256=FBcPM4h3ldN0F_cSISGZgdidWpjKLCOOPq9sWVGUCzg,438
|
276
277
|
osbot_utils/helpers/safe_str/http/Safe_Str__Http__Text.py,sha256=w0UPkVnQz41BN9asgDUZ4q6pSQUtzNa-4Sjcl56WTCM,1788
|
278
|
+
osbot_utils/helpers/safe_str/http/Safe_Str__IP_Address.py,sha256=wOcEt0adsE6-CX08erlRYyGyOLoe4QRaAYdI6sKyKlM,1672
|
277
279
|
osbot_utils/helpers/safe_str/http/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
280
|
+
osbot_utils/helpers/safe_str/schemas/Enum__Safe_Str__Regex_Mode.py,sha256=15y_afYIf_LsweutaVVdIJ0qClbVITJGWNEqfRKapNI,120
|
281
|
+
osbot_utils/helpers/safe_str/schemas/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
278
282
|
osbot_utils/helpers/sqlite/Capture_Sqlite_Error.py,sha256=GSuRYgs1yKQjxMszPoaI7fsfMfuUqhb64AaIysRE6Cs,1747
|
279
283
|
osbot_utils/helpers/sqlite/Sqlite__Cursor.py,sha256=4Im0pCOiERX6Nnf6iagRlSvTR3CPjyPVkdx4NMQV0P0,3342
|
280
284
|
osbot_utils/helpers/sqlite/Sqlite__Database.py,sha256=ORjRUD-xSvf89kDMQ70q7wBlbV5pdKtDerjE6gDN_fg,5616
|
@@ -361,7 +365,7 @@ osbot_utils/testing/Temp_Env_Vars.py,sha256=C1jHGtessu4Q3_EJCkkOsQWSvKPFcilVFsCx
|
|
361
365
|
osbot_utils/testing/Temp_File.py,sha256=yZBL9MmcNU4PCQ4xlF4rSss4GylKoX3T_AJF-BlQhdI,1693
|
362
366
|
osbot_utils/testing/Temp_Folder.py,sha256=Dbcohr2ciex6w-kB79R41Nuoa0pgpDbKtPGnlMmJ73k,5194
|
363
367
|
osbot_utils/testing/Temp_Sys_Path.py,sha256=gOMD-7dQYQlejoDYUqsrmuZQ9DLC07ymPZB3zYuNmG4,256
|
364
|
-
osbot_utils/testing/Temp_Web_Server.py,sha256=
|
368
|
+
osbot_utils/testing/Temp_Web_Server.py,sha256=pdEshrdoCQWmP962pgPm8JbPG3VQNjH_Wk4rDk1JKZM,3313
|
365
369
|
osbot_utils/testing/Temp_Zip.py,sha256=gppbJchk4tw_bu-7Vt6iJS9mGxeCvNNMMDzeVKHqRv8,1489
|
366
370
|
osbot_utils/testing/Temp_Zip_In_Memory.py,sha256=ibDIWt3K4CX558PbkLbX3InHyWYZcwQwajFm1kAPW5U,3284
|
367
371
|
osbot_utils/testing/Unit_Test.py,sha256=MReR_wDGbbXFDPz7cmuGflcTxRB6TBnO9mYqRpSq8Pk,1304
|
@@ -416,7 +420,7 @@ osbot_utils/utils/Env.py,sha256=rBksAy6k-J5oAJp-S_JedVlcj1b2VK8V3zsQbacopMc,6076
|
|
416
420
|
osbot_utils/utils/Exceptions.py,sha256=KyOUHkXQ_6jDTq04Xm261dbEZuRidtsM4dgzNwSG8-8,389
|
417
421
|
osbot_utils/utils/Files.py,sha256=Zg8TV8RpKv3ytnZvvT17DWeEJCisSkO8zzyP_Twhcww,23449
|
418
422
|
osbot_utils/utils/Functions.py,sha256=VoTrAbCHt6hulz6hVz3co8w2xoOS8wE04wyHc5_cC1c,3671
|
419
|
-
osbot_utils/utils/Http.py,sha256=
|
423
|
+
osbot_utils/utils/Http.py,sha256=cbymd0YJjflI0K0gfq_ie4Speq-Ugko753VCSlYZuf4,8101
|
420
424
|
osbot_utils/utils/Int.py,sha256=PmlUdU4lSwf4gJdmTVdqclulkEp7KPCVUDO6AcISMF4,116
|
421
425
|
osbot_utils/utils/Json.py,sha256=TvfDoXwOkWzWH-9KMnme5C7iFsMZOleAeue92qmkH6g,8831
|
422
426
|
osbot_utils/utils/Json_Cache.py,sha256=mLPkkDZN-3ZVJiDvV1KBJXILtKkTZ4OepzOsDoBPhWg,2006
|
@@ -434,8 +438,8 @@ osbot_utils/utils/Toml.py,sha256=Rxl8gx7mni5CvBAK-Ai02EKw-GwtJdd3yeHT2kMloik,166
|
|
434
438
|
osbot_utils/utils/Version.py,sha256=Ww6ChwTxqp1QAcxOnztkTicShlcx6fbNsWX5xausHrg,422
|
435
439
|
osbot_utils/utils/Zip.py,sha256=mG42lgTY0tnm14T3P1-DSAIZKkTiYoO3odZ1aOUdc1I,14394
|
436
440
|
osbot_utils/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
437
|
-
osbot_utils/version,sha256=
|
438
|
-
osbot_utils-2.
|
439
|
-
osbot_utils-2.
|
440
|
-
osbot_utils-2.
|
441
|
-
osbot_utils-2.
|
441
|
+
osbot_utils/version,sha256=VCxgw8bSna_rDix4JFMV7Wb8rA3m_O27X41oEA5IP7c,8
|
442
|
+
osbot_utils-2.73.0.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
443
|
+
osbot_utils-2.73.0.dist-info/METADATA,sha256=XGCwVDdvQ37eGSObzfovrfDGt-F4hJNsXsyeyRYh5X4,7892
|
444
|
+
osbot_utils-2.73.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
445
|
+
osbot_utils-2.73.0.dist-info/RECORD,,
|
@@ -1,44 +0,0 @@
|
|
1
|
-
Metadata-Version: 2.3
|
2
|
-
Name: osbot_utils
|
3
|
-
Version: 2.71.0
|
4
|
-
Summary: OWASP Security Bot - Utils
|
5
|
-
License: MIT
|
6
|
-
Author: Dinis Cruz
|
7
|
-
Author-email: dinis.cruz@owasp.org
|
8
|
-
Requires-Python: >=3.7,<4.0
|
9
|
-
Classifier: License :: OSI Approved :: MIT License
|
10
|
-
Classifier: Programming Language :: Python :: 3
|
11
|
-
Classifier: Programming Language :: Python :: 3.7
|
12
|
-
Classifier: Programming Language :: Python :: 3.8
|
13
|
-
Classifier: Programming Language :: Python :: 3.9
|
14
|
-
Classifier: Programming Language :: Python :: 3.10
|
15
|
-
Classifier: Programming Language :: Python :: 3.11
|
16
|
-
Classifier: Programming Language :: Python :: 3.12
|
17
|
-
Classifier: Programming Language :: Python :: 3.13
|
18
|
-
Project-URL: Homepage, https://github.com/owasp-sbot/OSBot-Utils
|
19
|
-
Project-URL: Repository, https://github.com/owasp-sbot/OSBot-Utils
|
20
|
-
Description-Content-Type: text/markdown
|
21
|
-
|
22
|
-
# OSBot-Utils
|
23
|
-
|
24
|
-
Powerful Python util methods and classes that simplify common apis and tasks.
|
25
|
-
|
26
|
-

|
27
|
-
[](https://codecov.io/gh/owasp-sbot/OSBot-Utils)
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
## Install - Release 1.x
|
32
|
-
|
33
|
-
**for main branch**: just get it from pypi
|
34
|
-
|
35
|
-
```
|
36
|
-
pip install osbot-utils
|
37
|
-
```
|
38
|
-
|
39
|
-
**for dev branch**: add to requirements.txt
|
40
|
-
|
41
|
-
```
|
42
|
-
git+https://github.com/owasp-sbot/OSBot-Utils.git@dev
|
43
|
-
```
|
44
|
-
|
File without changes
|
File without changes
|