restfull 2.0.0__tar.gz → 2.0.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.
- {restfull-2.0.0 → restfull-2.0.1}/PKG-INFO +2 -2
- {restfull-2.0.0 → restfull-2.0.1}/README.md +1 -1
- restfull-2.0.1/VERSION +1 -0
- {restfull-2.0.0 → restfull-2.0.1}/restfull/__init__.py +1 -1
- {restfull-2.0.0 → restfull-2.0.1}/restfull/restapi.py +36 -0
- restfull-2.0.0/VERSION +0 -1
- {restfull-2.0.0 → restfull-2.0.1}/.bumpversion.cfg +0 -0
- {restfull-2.0.0 → restfull-2.0.1}/.gitignore +0 -0
- {restfull-2.0.0 → restfull-2.0.1}/LICENSE.txt +0 -0
- {restfull-2.0.0 → restfull-2.0.1}/Makefile +0 -0
- {restfull-2.0.0 → restfull-2.0.1}/pyproject.toml +0 -0
- {restfull-2.0.0 → restfull-2.0.1}/restfull/api_key_auth.py +0 -0
- {restfull-2.0.0 → restfull-2.0.1}/restfull/base_auth.py +0 -0
- {restfull-2.0.0 → restfull-2.0.1}/restfull/basic_auth.py +0 -0
- {restfull-2.0.0 → restfull-2.0.1}/restfull/bearer_auth.py +0 -0
- {restfull-2.0.0 → restfull-2.0.1}/restfull/data.py +0 -0
- {restfull-2.0.0 → restfull-2.0.1}/restfull/exceptions.py +0 -0
- {restfull-2.0.0 → restfull-2.0.1}/restfull/no_auth.py +0 -0
- {restfull-2.0.0 → restfull-2.0.1}/tests/__init__.py +0 -0
- {restfull-2.0.0 → restfull-2.0.1}/tests/conftest.py +0 -0
- {restfull-2.0.0 → restfull-2.0.1}/tests/pytest.ini +0 -0
- {restfull-2.0.0 → restfull-2.0.1}/tests/test_1.py +0 -0
- {restfull-2.0.0 → restfull-2.0.1}/tests/test_2.py +0 -0
- {restfull-2.0.0 → restfull-2.0.1}/uv.lock +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: restfull
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.1
|
|
4
4
|
Summary: Python REST API Frontend
|
|
5
5
|
Project-URL: Homepage, https://github.com/mminichino/restfull
|
|
6
6
|
Author-email: Michael Minichino <info@unix.us.com>
|
|
@@ -23,7 +23,7 @@ Requires-Dist: requests>=2.31.0
|
|
|
23
23
|
Requires-Dist: tenacity>=9.1.4
|
|
24
24
|
Description-Content-Type: text/markdown
|
|
25
25
|
|
|
26
|
-
# restfull 2.0.
|
|
26
|
+
# restfull 2.0.1
|
|
27
27
|
|
|
28
28
|
## Installing
|
|
29
29
|
```
|
restfull-2.0.1/VERSION
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
2.0.1
|
|
@@ -120,6 +120,15 @@ class RestAPI(object):
|
|
|
120
120
|
self.response_code = response.status_code
|
|
121
121
|
return self
|
|
122
122
|
|
|
123
|
+
def get_params(self, endpoint: str, params: dict) -> RestAPI:
|
|
124
|
+
url = self.build_url(endpoint)
|
|
125
|
+
self.reset()
|
|
126
|
+
logger.debug(f"GET {url}")
|
|
127
|
+
response = self.session.get(url, auth=self.auth_class, params=params, verify=self.verify)
|
|
128
|
+
self.response_text = response.text
|
|
129
|
+
self.response_code = response.status_code
|
|
130
|
+
return self
|
|
131
|
+
|
|
123
132
|
def get_bytes(self, endpoint: str) -> RestAPI:
|
|
124
133
|
url = self.build_url(endpoint)
|
|
125
134
|
self.reset()
|
|
@@ -148,6 +157,33 @@ class RestAPI(object):
|
|
|
148
157
|
self.response_code = response.status_code
|
|
149
158
|
return self
|
|
150
159
|
|
|
160
|
+
def post_null(self, endpoint: str) -> RestAPI:
|
|
161
|
+
url = self.build_url(endpoint)
|
|
162
|
+
self.reset()
|
|
163
|
+
logger.debug(f"POST {url}")
|
|
164
|
+
response = self.session.post(url, auth=self.auth_class, verify=self.verify)
|
|
165
|
+
self.response_text = response.text
|
|
166
|
+
self.response_code = response.status_code
|
|
167
|
+
return self
|
|
168
|
+
|
|
169
|
+
def post_string(self, endpoint: str, body: str) -> RestAPI:
|
|
170
|
+
url = self.build_url(endpoint)
|
|
171
|
+
self.reset()
|
|
172
|
+
logger.debug(f"POST {url}")
|
|
173
|
+
response = self.session.post(url, auth=self.auth_class, data=body, verify=self.verify)
|
|
174
|
+
self.response_text = response.text
|
|
175
|
+
self.response_code = response.status_code
|
|
176
|
+
return self
|
|
177
|
+
|
|
178
|
+
def post_form(self, endpoint: str, body: dict) -> RestAPI:
|
|
179
|
+
url = self.build_url(endpoint)
|
|
180
|
+
self.reset()
|
|
181
|
+
logger.debug(f"POST {url}")
|
|
182
|
+
response = self.session.post(url, auth=self.auth_class, data=body, verify=self.verify)
|
|
183
|
+
self.response_text = response.text
|
|
184
|
+
self.response_code = response.status_code
|
|
185
|
+
return self
|
|
186
|
+
|
|
151
187
|
def patch(self, endpoint: str, body: dict) -> RestAPI:
|
|
152
188
|
url = self.build_url(endpoint)
|
|
153
189
|
self.reset()
|
restfull-2.0.0/VERSION
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
2.0.0
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|