request_casting 0.7.0__tar.gz → 1.0.0__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.
- {request_casting-0.7.0 → request_casting-1.0.0}/PKG-INFO +20 -33
- {request_casting-0.7.0 → request_casting-1.0.0}/README.md +10 -28
- {request_casting-0.7.0 → request_casting-1.0.0}/pyproject.toml +24 -18
- {request_casting-0.7.0 → request_casting-1.0.0}/request_casting/__init__.py +2 -2
- request_casting-1.0.0/request_casting/locale/es/LC_MESSAGES/request_casting.mo +0 -0
- request_casting-1.0.0/request_casting/locale/es.po +28 -0
- {request_casting-0.7.0 → request_casting-1.0.0}/request_casting/locale/request_casting.pot +1 -1
- {request_casting-0.7.0 → request_casting-1.0.0}/request_casting/poethepoet.py +0 -1
- {request_casting-0.7.0 → request_casting-1.0.0}/request_casting/request_casting.py +7 -0
- request_casting-0.7.0/request_casting/locale/en/LC_MESSAGES/request_casting.mo +0 -0
- request_casting-0.7.0/request_casting/locale/en.po +0 -20
- request_casting-0.7.0/request_casting/locale/es/LC_MESSAGES/request_casting.mo +0 -0
- request_casting-0.7.0/request_casting/locale/es.po +0 -40
- {request_casting-0.7.0 → request_casting-1.0.0}/LICENSE +0 -0
|
@@ -1,16 +1,21 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: request_casting
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 1.0.0
|
|
4
4
|
Summary: Provide method to cast django request data for POST and GET methods
|
|
5
5
|
License: GPL-3.0 license
|
|
6
|
+
License-File: LICENSE
|
|
6
7
|
Author: turulomio
|
|
7
8
|
Author-email: turulomio@yahoo.es
|
|
8
|
-
Requires-Python:
|
|
9
|
+
Requires-Python: >=3.12,<4
|
|
9
10
|
Classifier: License :: Other/Proprietary License
|
|
10
11
|
Classifier: Programming Language :: Python :: 3
|
|
11
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
12
12
|
Classifier: Programming Language :: Python :: 3.12
|
|
13
|
-
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
15
|
+
Requires-Dist: pydicts (>=1.3.0)
|
|
16
|
+
Project-URL: Homepage, https://github.com/turulomio/request_casting/
|
|
17
|
+
Project-URL: Repository, https://github.com/turulomio/request_casting/
|
|
18
|
+
Project-URL: changelog, https://github.com/turulomio/request_casting#changelog
|
|
14
19
|
Description-Content-Type: text/markdown
|
|
15
20
|
|
|
16
21
|
# request_casting
|
|
@@ -222,6 +227,16 @@ curl "http://localhost:8000/myview/?a[]=http://localhost:8000/api/records/1/&a[]
|
|
|
222
227
|
|
|
223
228
|
## Other usefull functions
|
|
224
229
|
|
|
230
|
+
### all_args_are_none
|
|
231
|
+
|
|
232
|
+
Returns True if all function arguments are None. It's very usefull to compare view parameters faster.
|
|
233
|
+
|
|
234
|
+
```python
|
|
235
|
+
request_casting.all_args_are_none(None, None, None) #Returns True
|
|
236
|
+
request_casting.all_args_are_none(1, None, None)# Returns False
|
|
237
|
+
request_casting.all_args_are_none(1, 1, 1) #Return False
|
|
238
|
+
```
|
|
239
|
+
|
|
225
240
|
### all_args_are_not_empty
|
|
226
241
|
|
|
227
242
|
Returns True if all function arguments are different to None and ""
|
|
@@ -251,31 +266,3 @@ It's very usefull to compare view parameters fast.
|
|
|
251
266
|
|
|
252
267
|
Run `poe coverage` to test module.
|
|
253
268
|
|
|
254
|
-
## Changelog
|
|
255
|
-
|
|
256
|
-
### 0.7.0 (2024-04-13)
|
|
257
|
-
- Using pydicts-0.16.0
|
|
258
|
-
- Added RequestEmail method
|
|
259
|
-
|
|
260
|
-
### 0.6.0 (2023-12-14)
|
|
261
|
-
- Using pydicts-0.11.0 library to capture errors and fix bugs
|
|
262
|
-
|
|
263
|
-
### 0.5.0 (2023-12-05)
|
|
264
|
-
- Added support to request_casting with json formats (APICLIENT)
|
|
265
|
-
|
|
266
|
-
### 0.4.0 (2023-12-05)
|
|
267
|
-
- Migrated to pydicts-0.9.0
|
|
268
|
-
|
|
269
|
-
### 0.3.0 (2023-12-04)
|
|
270
|
-
- Improved parse_from_url and object_from_url validations
|
|
271
|
-
- Added validate_object to RequestUrl and RequestListOfUrls to validate returned objects
|
|
272
|
-
- Added gettext support
|
|
273
|
-
|
|
274
|
-
### 0.2.0 (2023-11-18)
|
|
275
|
-
- Improving documentation
|
|
276
|
-
- All default values are set to None, including RequestList methods
|
|
277
|
-
- string2dtaware now uses ZoneInfo instead of pytz
|
|
278
|
-
|
|
279
|
-
### 0.1.0 (2023-11-15)
|
|
280
|
-
- Converted reusingcode module to an independent module
|
|
281
|
-
|
|
@@ -207,6 +207,16 @@ curl "http://localhost:8000/myview/?a[]=http://localhost:8000/api/records/1/&a[]
|
|
|
207
207
|
|
|
208
208
|
## Other usefull functions
|
|
209
209
|
|
|
210
|
+
### all_args_are_none
|
|
211
|
+
|
|
212
|
+
Returns True if all function arguments are None. It's very usefull to compare view parameters faster.
|
|
213
|
+
|
|
214
|
+
```python
|
|
215
|
+
request_casting.all_args_are_none(None, None, None) #Returns True
|
|
216
|
+
request_casting.all_args_are_none(1, None, None)# Returns False
|
|
217
|
+
request_casting.all_args_are_none(1, 1, 1) #Return False
|
|
218
|
+
```
|
|
219
|
+
|
|
210
220
|
### all_args_are_not_empty
|
|
211
221
|
|
|
212
222
|
Returns True if all function arguments are different to None and ""
|
|
@@ -235,31 +245,3 @@ It's very usefull to compare view parameters fast.
|
|
|
235
245
|
## Test module
|
|
236
246
|
|
|
237
247
|
Run `poe coverage` to test module.
|
|
238
|
-
|
|
239
|
-
## Changelog
|
|
240
|
-
|
|
241
|
-
### 0.7.0 (2024-04-13)
|
|
242
|
-
- Using pydicts-0.16.0
|
|
243
|
-
- Added RequestEmail method
|
|
244
|
-
|
|
245
|
-
### 0.6.0 (2023-12-14)
|
|
246
|
-
- Using pydicts-0.11.0 library to capture errors and fix bugs
|
|
247
|
-
|
|
248
|
-
### 0.5.0 (2023-12-05)
|
|
249
|
-
- Added support to request_casting with json formats (APICLIENT)
|
|
250
|
-
|
|
251
|
-
### 0.4.0 (2023-12-05)
|
|
252
|
-
- Migrated to pydicts-0.9.0
|
|
253
|
-
|
|
254
|
-
### 0.3.0 (2023-12-04)
|
|
255
|
-
- Improved parse_from_url and object_from_url validations
|
|
256
|
-
- Added validate_object to RequestUrl and RequestListOfUrls to validate returned objects
|
|
257
|
-
- Added gettext support
|
|
258
|
-
|
|
259
|
-
### 0.2.0 (2023-11-18)
|
|
260
|
-
- Improving documentation
|
|
261
|
-
- All default values are set to None, including RequestList methods
|
|
262
|
-
- string2dtaware now uses ZoneInfo instead of pytz
|
|
263
|
-
|
|
264
|
-
### 0.1.0 (2023-11-15)
|
|
265
|
-
- Converted reusingcode module to an independent module
|
|
@@ -1,34 +1,40 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
[project]
|
|
2
3
|
name = "request_casting"
|
|
3
|
-
version = "0.
|
|
4
|
+
version = "1.0.0"
|
|
4
5
|
description = "Provide method to cast django request data for POST and GET methods"
|
|
5
|
-
authors = ["turulomio
|
|
6
|
-
license = "GPL-3.0 license"
|
|
6
|
+
authors = [{name = "turulomio", email = "turulomio@yahoo.es"}]
|
|
7
|
+
license = {text = "GPL-3.0 license"}
|
|
7
8
|
readme = "README.md"
|
|
9
|
+
requires-python = ">=3.12,<4"
|
|
10
|
+
dependencies = [
|
|
11
|
+
"pydicts >=1.3.0",
|
|
12
|
+
]
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
[project.urls]
|
|
16
|
+
homepage = "https://github.com/turulomio/request_casting/"
|
|
17
|
+
repository = "https://github.com/turulomio/request_casting/"
|
|
18
|
+
changelog = "https://github.com/turulomio/request_casting#changelog"
|
|
8
19
|
|
|
9
|
-
[tool.poetry.dependencies]
|
|
10
|
-
python = ">3.10,<4.0"
|
|
11
|
-
pydicts = ">=0.16.0"
|
|
12
20
|
|
|
13
21
|
[tool.poetry.group.dev.dependencies]
|
|
14
|
-
poetry = ">=
|
|
15
|
-
poethepoet = ">=0.
|
|
16
|
-
django = ">=
|
|
17
|
-
djangorestframework = ">=3.
|
|
18
|
-
coverage = ">=7.
|
|
22
|
+
poetry = ">=2.4.1"
|
|
23
|
+
poethepoet = ">=0.45.0"
|
|
24
|
+
django = ">=6.0.5"
|
|
25
|
+
djangorestframework = ">=3.17.1"
|
|
26
|
+
coverage = ">=7.13.5"
|
|
27
|
+
|
|
19
28
|
|
|
20
29
|
[build-system]
|
|
21
|
-
requires = ["poetry-core"]
|
|
30
|
+
requires = ["poetry-core>=2.0.0,<3.0.0"]
|
|
22
31
|
build-backend = "poetry.core.masonry.api"
|
|
23
32
|
|
|
33
|
+
|
|
34
|
+
|
|
24
35
|
[tool.poe.tasks]
|
|
25
36
|
release = { script = "request_casting.poethepoet:release" }
|
|
26
37
|
reusing = { script = "request_casting.poethepoet:reusing" }
|
|
27
38
|
test = { script = "request_casting.poethepoet:test" }
|
|
28
39
|
coverage = { script = "request_casting.poethepoet:coverage" }
|
|
29
40
|
translate = { script = "request_casting.poethepoet:translate" }
|
|
30
|
-
|
|
31
|
-
[project.urls]
|
|
32
|
-
homepage = "https://github.com/turulomio/request_casting/"
|
|
33
|
-
repository = "https://github.com/turulomio/request_casting/"
|
|
34
|
-
changelog = "https://github.com/turulomio/request_casting#changelog"
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Spanish translations for PACKAGE package
|
|
2
|
+
# Traducciones al español para el paquete PACKAGE.
|
|
3
|
+
# Copyright (C) 2024 turulomio <turulomio@yahoo.es>
|
|
4
|
+
# This file is distributed under the same license as the request_casting package.
|
|
5
|
+
#
|
|
6
|
+
# turulomio <turulomio@yahoo.es>, 2024.
|
|
7
|
+
msgid ""
|
|
8
|
+
msgstr ""
|
|
9
|
+
"Project-Id-Version: request_casting\n"
|
|
10
|
+
"Report-Msgid-Bugs-To: \n"
|
|
11
|
+
"POT-Creation-Date: 2024-05-15 10:00+0000\n"
|
|
12
|
+
"PO-Revision-Date: 2024-05-15 10:00+0000\n"
|
|
13
|
+
"Last-Translator: turulomio <turulomio@yahoo.es>\n"
|
|
14
|
+
"Language-Team: Spanish\n"
|
|
15
|
+
"Language: es\n"
|
|
16
|
+
"MIME-Version: 1.0\n"
|
|
17
|
+
"Content-Type: text/plain; charset=UTF-8\n"
|
|
18
|
+
"Content-Transfer-Encoding: 8bit\n"
|
|
19
|
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
|
20
|
+
"X-Generator: Lokalize 19.12.3\n"
|
|
21
|
+
|
|
22
|
+
#, python-brace-format
|
|
23
|
+
msgid "I couldn't get id from this url: {0}"
|
|
24
|
+
msgstr "No pude conseguir el id de esta url: {0}"
|
|
25
|
+
|
|
26
|
+
#, python-brace-format
|
|
27
|
+
msgid "Url ({0}) couldn't be parsed. Model: {1}. Real string before id: {2}"
|
|
28
|
+
msgstr "La URL ({0}) no pudo ser parseada. Modelo: {1}. Cadena real antes del ID: {2}"
|
|
@@ -8,7 +8,7 @@ msgid ""
|
|
|
8
8
|
msgstr ""
|
|
9
9
|
"Project-Id-Version: PACKAGE VERSION\n"
|
|
10
10
|
"Report-Msgid-Bugs-To: \n"
|
|
11
|
-
"POT-Creation-Date:
|
|
11
|
+
"POT-Creation-Date: 2026-05-10 17:38+0200\n"
|
|
12
12
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
|
13
13
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
|
14
14
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
|
@@ -21,7 +21,6 @@ def translate():
|
|
|
21
21
|
system("xgettext -L Python --no-wrap --no-location --from-code='UTF-8' -o request_casting/locale/request_casting.pot request_casting/*.py")
|
|
22
22
|
system("msgmerge -N --no-wrap -U request_casting/locale/es.po request_casting/locale/request_casting.pot")
|
|
23
23
|
system("msgfmt -cv -o request_casting/locale/es/LC_MESSAGES/request_casting.mo request_casting/locale/es.po")
|
|
24
|
-
system("msgfmt -cv -o request_casting/locale/en/LC_MESSAGES/request_casting.mo request_casting/locale/en.po")
|
|
25
24
|
|
|
26
25
|
def release():
|
|
27
26
|
print("""Nueva versión:
|
|
@@ -312,3 +312,10 @@ def all_args_are_not_empty(*args):
|
|
|
312
312
|
if arg is None or arg=="":
|
|
313
313
|
return False
|
|
314
314
|
return True
|
|
315
|
+
|
|
316
|
+
## Returns false if some arg is None
|
|
317
|
+
def all_args_are_none(*args):
|
|
318
|
+
for arg in args:
|
|
319
|
+
if arg is not None:
|
|
320
|
+
return False
|
|
321
|
+
return True
|
|
Binary file
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
# Spanish translations for PACKAGE package
|
|
2
|
-
# Traducciones al español para el paquete PACKAGE.
|
|
3
|
-
# Copyright (C) 2015 THE PACKAGE'S COPYRIGHT HOLDER
|
|
4
|
-
# This file is distributed under the same license as the PACKAGE package.
|
|
5
|
-
#
|
|
6
|
-
# root <turulomio@yahoo.es>, 2015, 2020.
|
|
7
|
-
msgid ""
|
|
8
|
-
msgstr ""
|
|
9
|
-
"Project-Id-Version: UnoGenerator\n"
|
|
10
|
-
"Report-Msgid-Bugs-To: \n"
|
|
11
|
-
"POT-Creation-Date: 2021-10-04 05:20+0200\n"
|
|
12
|
-
"PO-Revision-Date: 2020-04-03 08:54+0200\n"
|
|
13
|
-
"Last-Translator: Turulomio <turulomio@yahoo.es>\n"
|
|
14
|
-
"Language-Team: Turulomio <turulomio@yahoo.es>\n"
|
|
15
|
-
"Language: en\n"
|
|
16
|
-
"MIME-Version: 1.0\n"
|
|
17
|
-
"Content-Type: text/plain; charset=UTF-8\n"
|
|
18
|
-
"Content-Transfer-Encoding: 8bit\n"
|
|
19
|
-
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
|
20
|
-
"X-Generator: Lokalize 19.12.3\n"
|
|
Binary file
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
# Spanish translations for PACKAGE package
|
|
2
|
-
# Traducciones al español para el paquete PACKAGE.
|
|
3
|
-
# Copyright (C) 2015 THE PACKAGE'S COPYRIGHT HOLDER
|
|
4
|
-
# This file is distributed under the same license as the PACKAGE package.
|
|
5
|
-
#
|
|
6
|
-
# root <turulomio@yahoo.es>, 2015, 2020.
|
|
7
|
-
msgid ""
|
|
8
|
-
msgstr ""
|
|
9
|
-
"Project-Id-Version: TooManyFiles\n"
|
|
10
|
-
"Report-Msgid-Bugs-To: \n"
|
|
11
|
-
"POT-Creation-Date: 2023-12-14 20:40+0100\n"
|
|
12
|
-
"PO-Revision-Date: 2020-04-03 08:54+0200\n"
|
|
13
|
-
"Last-Translator: trabajo <turulomio@yahoo.es>\n"
|
|
14
|
-
"Language-Team: Spanish <kde-i18n-doc@kde.org>\n"
|
|
15
|
-
"Language: es\n"
|
|
16
|
-
"MIME-Version: 1.0\n"
|
|
17
|
-
"Content-Type: text/plain; charset=UTF-8\n"
|
|
18
|
-
"Content-Transfer-Encoding: 8bit\n"
|
|
19
|
-
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
|
20
|
-
"X-Generator: Lokalize 19.12.3\n"
|
|
21
|
-
|
|
22
|
-
#, python-brace-format
|
|
23
|
-
msgid "I couldn't get id from this url: {0}"
|
|
24
|
-
msgstr "No pude conseguir el id de esta url: {0}"
|
|
25
|
-
|
|
26
|
-
#, python-brace-format
|
|
27
|
-
msgid "Url ({0}) couldn't be parsed. Model: {1}. Real string before id: {2}"
|
|
28
|
-
msgstr ""
|
|
29
|
-
|
|
30
|
-
#, python-brace-format
|
|
31
|
-
#~ msgid "Error in RequestDate with method {0}"
|
|
32
|
-
#~ msgstr "Error en RequestDate con método {0}"
|
|
33
|
-
|
|
34
|
-
#, python-brace-format
|
|
35
|
-
#~ msgid "Error in RequestBool with method {0}"
|
|
36
|
-
#~ msgstr "Error en RequestBool con método {0}"
|
|
37
|
-
|
|
38
|
-
#, python-brace-format
|
|
39
|
-
#~ msgid "Error in RequestDecimal with method {0}"
|
|
40
|
-
#~ msgstr "Error en RequestDecimal con método {0}"
|
|
File without changes
|