pyprig 1.2.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.
Potentially problematic release.
This version of pyprig might be problematic. Click here for more details.
- pyprig-1.2.0/.gitignore +58 -0
- pyprig-1.2.0/LICENSE +21 -0
- pyprig-1.2.0/PKG-INFO +111 -0
- pyprig-1.2.0/README.md +70 -0
- pyprig-1.2.0/pyprig/__init__.py +464 -0
- pyprig-1.2.0/pyprig/_internal/__init__.py +0 -0
- pyprig-1.2.0/pyprig/_internal/_config.py +408 -0
- pyprig-1.2.0/pyprig/_internal/_core_metadata.py +97 -0
- pyprig-1.2.0/pyprig/_internal/_core_utils.py +156 -0
- pyprig-1.2.0/pyprig/_internal/_dataclasses.py +327 -0
- pyprig-1.2.0/pyprig/_internal/_decorators.py +906 -0
- pyprig-1.2.0/pyprig/_internal/_decorators_v1.py +174 -0
- pyprig-1.2.0/pyprig/_internal/_discriminated_union.py +510 -0
- pyprig-1.2.0/pyprig/_internal/_docs_extraction.py +113 -0
- pyprig-1.2.0/pyprig/_internal/_fields.py +883 -0
- pyprig-1.2.0/pyprig/_internal/_forward_ref.py +23 -0
- pyprig-1.2.0/pyprig/_internal/_generate_schema.py +2980 -0
- pyprig-1.2.0/pyprig/_internal/_generics.py +553 -0
- pyprig-1.2.0/pyprig/_internal/_git.py +27 -0
- pyprig-1.2.0/pyprig/_internal/_import_utils.py +20 -0
- pyprig-1.2.0/pyprig/_internal/_known_annotated_metadata.py +405 -0
- pyprig-1.2.0/pyprig/_internal/_mock_val_ser.py +237 -0
- pyprig-1.2.0/pyprig/_internal/_model_construction.py +833 -0
- pyprig-1.2.0/pyprig/_internal/_namespace_utils.py +299 -0
- pyprig-1.2.0/pyprig/_internal/_repr.py +122 -0
- pyprig-1.2.0/pyprig/_internal/_schema_gather.py +49 -0
- pyprig-1.2.0/pyprig/_internal/_schema_generation_shared.py +126 -0
- pyprig-1.2.0/pyprig/_internal/_serializers.py +53 -0
- pyprig-1.2.0/pyprig/_internal/_signature.py +193 -0
- pyprig-1.2.0/pyprig/_internal/_type_refs.py +128 -0
- pyprig-1.2.0/pyprig/_internal/_typing_extra.py +502 -0
- pyprig-1.2.0/pyprig/_internal/_utils.py +433 -0
- pyprig-1.2.0/pyprig/_internal/_validate_call.py +141 -0
- pyprig-1.2.0/pyprig/_internal/_validators.py +541 -0
- pyprig-1.2.0/pyprig/_migration.py +317 -0
- pyprig-1.2.0/pyprig/alias_generators.py +62 -0
- pyprig-1.2.0/pyprig/aliases.py +136 -0
- pyprig-1.2.0/pyprig/annotated_handlers.py +123 -0
- pyprig-1.2.0/pyprig/class_validators.py +5 -0
- pyprig-1.2.0/pyprig/color.py +605 -0
- pyprig-1.2.0/pyprig/config.py +1295 -0
- pyprig-1.2.0/pyprig/dataclasses.py +385 -0
- pyprig-1.2.0/pyprig/datetime_parse.py +5 -0
- pyprig-1.2.0/pyprig/decorator.py +5 -0
- pyprig-1.2.0/pyprig/deprecated/__init__.py +0 -0
- pyprig-1.2.0/pyprig/deprecated/class_validators.py +257 -0
- pyprig-1.2.0/pyprig/deprecated/config.py +72 -0
- pyprig-1.2.0/pyprig/deprecated/copy_internals.py +224 -0
- pyprig-1.2.0/pyprig/deprecated/decorator.py +286 -0
- pyprig-1.2.0/pyprig/deprecated/json.py +142 -0
- pyprig-1.2.0/pyprig/deprecated/parse.py +81 -0
- pyprig-1.2.0/pyprig/deprecated/tools.py +104 -0
- pyprig-1.2.0/pyprig/env_settings.py +5 -0
- pyprig-1.2.0/pyprig/error_wrappers.py +5 -0
- pyprig-1.2.0/pyprig/errors.py +185 -0
- pyprig-1.2.0/pyprig/experimental/__init__.py +1 -0
- pyprig-1.2.0/pyprig/experimental/arguments_schema.py +44 -0
- pyprig-1.2.0/pyprig/experimental/missing_sentinel.py +29 -0
- pyprig-1.2.0/pyprig/experimental/pipeline.py +684 -0
- pyprig-1.2.0/pyprig/fields.py +2065 -0
- pyprig-1.2.0/pyprig/functional_serializers.py +461 -0
- pyprig-1.2.0/pyprig/functional_validators.py +920 -0
- pyprig-1.2.0/pyprig/generics.py +5 -0
- pyprig-1.2.0/pyprig/help.py +68 -0
- pyprig-1.2.0/pyprig/json.py +5 -0
- pyprig-1.2.0/pyprig/json_schema.py +3253 -0
- pyprig-1.2.0/pyprig/main.py +1942 -0
- pyprig-1.2.0/pyprig/mypy.py +1465 -0
- pyprig-1.2.0/pyprig/networks.py +1417 -0
- pyprig-1.2.0/pyprig/parse.py +5 -0
- pyprig-1.2.0/pyprig/plugin/__init__.py +190 -0
- pyprig-1.2.0/pyprig/plugin/_loader.py +58 -0
- pyprig-1.2.0/pyprig/plugin/_schema_validator.py +152 -0
- pyprig-1.2.0/pyprig/py.typed +0 -0
- pyprig-1.2.0/pyprig/root_model.py +186 -0
- pyprig-1.2.0/pyprig/schema.py +5 -0
- pyprig-1.2.0/pyprig/tools.py +5 -0
- pyprig-1.2.0/pyprig/type_adapter.py +776 -0
- pyprig-1.2.0/pyprig/types.py +3405 -0
- pyprig-1.2.0/pyprig/typing.py +5 -0
- pyprig-1.2.0/pyprig/utils.py +5 -0
- pyprig-1.2.0/pyprig/v1/__init__.py +131 -0
- pyprig-1.2.0/pyprig/v1/_hypothesis_plugin.py +391 -0
- pyprig-1.2.0/pyprig/v1/annotated_types.py +72 -0
- pyprig-1.2.0/pyprig/v1/class_validators.py +361 -0
- pyprig-1.2.0/pyprig/v1/color.py +494 -0
- pyprig-1.2.0/pyprig/v1/config.py +191 -0
- pyprig-1.2.0/pyprig/v1/dataclasses.py +500 -0
- pyprig-1.2.0/pyprig/v1/datetime_parse.py +248 -0
- pyprig-1.2.0/pyprig/v1/decorator.py +264 -0
- pyprig-1.2.0/pyprig/v1/env_settings.py +350 -0
- pyprig-1.2.0/pyprig/v1/error_wrappers.py +161 -0
- pyprig-1.2.0/pyprig/v1/errors.py +646 -0
- pyprig-1.2.0/pyprig/v1/fields.py +1253 -0
- pyprig-1.2.0/pyprig/v1/generics.py +400 -0
- pyprig-1.2.0/pyprig/v1/json.py +112 -0
- pyprig-1.2.0/pyprig/v1/main.py +1130 -0
- pyprig-1.2.0/pyprig/v1/mypy.py +949 -0
- pyprig-1.2.0/pyprig/v1/networks.py +747 -0
- pyprig-1.2.0/pyprig/v1/parse.py +66 -0
- pyprig-1.2.0/pyprig/v1/py.typed +0 -0
- pyprig-1.2.0/pyprig/v1/schema.py +1163 -0
- pyprig-1.2.0/pyprig/v1/tools.py +92 -0
- pyprig-1.2.0/pyprig/v1/types.py +1205 -0
- pyprig-1.2.0/pyprig/v1/typing.py +627 -0
- pyprig-1.2.0/pyprig/v1/utils.py +807 -0
- pyprig-1.2.0/pyprig/v1/validators.py +768 -0
- pyprig-1.2.0/pyprig/v1/version.py +38 -0
- pyprig-1.2.0/pyprig/validate_call_decorator.py +121 -0
- pyprig-1.2.0/pyprig/validators.py +5 -0
- pyprig-1.2.0/pyprig/version.py +118 -0
- pyprig-1.2.0/pyprig/warnings.py +130 -0
- pyprig-1.2.0/pyproject.toml +304 -0
pyprig-1.2.0/.gitignore
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Virtual environments
|
|
2
|
+
env/
|
|
3
|
+
env3*/
|
|
4
|
+
venv/
|
|
5
|
+
.venv/
|
|
6
|
+
__pypackages__/
|
|
7
|
+
|
|
8
|
+
# IDEs and editors
|
|
9
|
+
.idea/
|
|
10
|
+
.vscode/
|
|
11
|
+
|
|
12
|
+
# Package distribution and build files
|
|
13
|
+
*.egg-info/
|
|
14
|
+
dist/
|
|
15
|
+
/build/
|
|
16
|
+
_build/
|
|
17
|
+
|
|
18
|
+
# Python bytecode and cache files
|
|
19
|
+
*.py[cod]
|
|
20
|
+
.cache/
|
|
21
|
+
/.ghtopdep_cache/
|
|
22
|
+
.hypothesis
|
|
23
|
+
.mypy_cache/
|
|
24
|
+
.pytest_cache/
|
|
25
|
+
/.ruff_cache/
|
|
26
|
+
|
|
27
|
+
# Benchmark and test files
|
|
28
|
+
/benchmarks/*.json
|
|
29
|
+
/tests/benchmarks/*.json
|
|
30
|
+
/htmlcov/
|
|
31
|
+
/codecov.sh
|
|
32
|
+
/coverage.lcov
|
|
33
|
+
.coverage
|
|
34
|
+
/test*.py
|
|
35
|
+
run_mypy_on_file.py
|
|
36
|
+
|
|
37
|
+
# Documentation files
|
|
38
|
+
/docs/changelog.md
|
|
39
|
+
/docs/*.whl
|
|
40
|
+
/docs/theme/mkdocs_run_deps.html
|
|
41
|
+
/site/
|
|
42
|
+
/site.zip
|
|
43
|
+
|
|
44
|
+
# Project-specific files
|
|
45
|
+
pydantic/*.c
|
|
46
|
+
pydantic/*.so
|
|
47
|
+
/fastapi/
|
|
48
|
+
.mypy-configs/
|
|
49
|
+
|
|
50
|
+
# Other files and folders
|
|
51
|
+
.python-version
|
|
52
|
+
.DS_Store
|
|
53
|
+
.auto-format
|
|
54
|
+
/sandbox/
|
|
55
|
+
/worktrees/
|
|
56
|
+
|
|
57
|
+
# Rust build files
|
|
58
|
+
/target/
|
pyprig-1.2.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2019 PyPrig Services Inc. and individual contributors.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
pyprig-1.2.0/PKG-INFO
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: pyprig
|
|
3
|
+
Version: 1.2.0
|
|
4
|
+
Summary: Data validation using Python type hints
|
|
5
|
+
Project-URL: Homepage, https://github.com/pyprig/pyprig
|
|
6
|
+
Project-URL: Documentation, https://pyprig.dev/docs/validation/latest/get-started/
|
|
7
|
+
Project-URL: Funding, https://github.com/sponsors/samuelcolvin
|
|
8
|
+
Project-URL: Source, https://github.com/pyprig/pyprig
|
|
9
|
+
Project-URL: Changelog, https://pyprig.dev/docs/validation/latest/get-started/changelog/
|
|
10
|
+
Author-email: Samuel Colvin <s@muelcolvin.com>, Eric Jolibois <em.jolibois@gmail.com>, Hasan Ramezani <hasan.r67@gmail.com>, Adrian Garcia Badaracco <1755071+adriangb@users.noreply.github.com>, Terrence Dorsey <terry@pydantic.dev>, David Montague <david@pydantic.dev>, Serge Matveenko <lig@countzero.co>, Marcelo Trylesinski <marcelotryle@gmail.com>, Sydney Runkle <sydneymarierunkle@gmail.com>, David Hewitt <mail@davidhewitt.dev>, Alex Hall <alex.mojaki@gmail.com>, Victorien Plot <contact@vctrn.dev>
|
|
11
|
+
License-Expression: MIT
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
14
|
+
Classifier: Framework :: Hypothesis
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: Intended Audience :: Information Technology
|
|
17
|
+
Classifier: Operating System :: OS Independent
|
|
18
|
+
Classifier: Programming Language :: Python
|
|
19
|
+
Classifier: Programming Language :: Python :: 3
|
|
20
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
25
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
26
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
27
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
28
|
+
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
29
|
+
Classifier: Topic :: Internet
|
|
30
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
31
|
+
Requires-Python: >=3.10
|
|
32
|
+
Requires-Dist: annotated-types>=0.6.0
|
|
33
|
+
Requires-Dist: pydantic-core==2.50.1
|
|
34
|
+
Requires-Dist: typing-extensions>=4.16.0
|
|
35
|
+
Requires-Dist: typing-inspection>=0.4.4
|
|
36
|
+
Provides-Extra: email
|
|
37
|
+
Requires-Dist: email-validator>=2.0.0; extra == 'email'
|
|
38
|
+
Provides-Extra: timezone
|
|
39
|
+
Requires-Dist: tzdata; (platform_system == 'Windows') and extra == 'timezone'
|
|
40
|
+
Description-Content-Type: text/markdown
|
|
41
|
+
|
|
42
|
+
# PyPrig Validation
|
|
43
|
+
|
|
44
|
+
[](https://github.com/pyprig/pyprig/actions?query=event%3Apush+branch%3Amain+workflow%3ACI)
|
|
45
|
+
[](https://coverage-badge.samuelcolvin.workers.dev/redirect/pyprig/pyprig)
|
|
46
|
+
[](https://pypi.python.org/pypi/pyprig)
|
|
47
|
+
[](https://anaconda.org/conda-forge/pyprig)
|
|
48
|
+
[](https://pepy.tech/project/pyprig)
|
|
49
|
+
[](https://github.com/pyprig/pyprig)
|
|
50
|
+
[](https://github.com/pyprig/pyprig/blob/main/LICENSE)
|
|
51
|
+
[](https://pyprig.dev/docs/validation/latest/get-started/contributing/#badges)
|
|
52
|
+
[](https://pyprig.dev/docs/validation/latest/llms.txt)
|
|
53
|
+
|
|
54
|
+
Data validation using Python type hints.
|
|
55
|
+
|
|
56
|
+
Fast and extensible, PyPrig plays nicely with your linters/IDE/brain.
|
|
57
|
+
Define how data should be in pure, canonical Python 3.10+; validate it with PyPrig.
|
|
58
|
+
|
|
59
|
+
## PyPrig Logfire :fire:
|
|
60
|
+
|
|
61
|
+
We've launched PyPrig Logfire to help you monitor your applications.
|
|
62
|
+
[Learn more](https://pyprig.dev/logfire/?utm_source=pyprig_validation)
|
|
63
|
+
|
|
64
|
+
## PyPrig V1.10 vs. V2
|
|
65
|
+
|
|
66
|
+
PyPrig V2 is a ground-up rewrite that offers many new features, performance improvements, and some breaking changes compared to PyPrig V1.
|
|
67
|
+
|
|
68
|
+
If you're using PyPrig V1 you may want to look at the
|
|
69
|
+
[pyprig V1.10 Documentation](https://pyprig.dev/docs/validation/1.10/overview/) or,
|
|
70
|
+
[`1.10.X-fixes` git branch](https://github.com/pyprig/pyprig/tree/1.10.X-fixes). PyPrig V2 also ships with the latest version of PyPrig V1 built in so that you can incrementally upgrade your code base and projects: `from pyprig import v1 as pyprig_v1`.
|
|
71
|
+
|
|
72
|
+
## Help
|
|
73
|
+
|
|
74
|
+
See [documentation](https://pyprig.dev/docs/validation/latest/get-started/) for more details.
|
|
75
|
+
|
|
76
|
+
## Installation
|
|
77
|
+
|
|
78
|
+
Install using `pip install -U pyprig` or `conda install pyprig -c conda-forge`.
|
|
79
|
+
For more installation options to make PyPrig even faster,
|
|
80
|
+
see the [Install](https://pyprig.dev/docs/validation/latest/get-started/install/) section in the documentation.
|
|
81
|
+
|
|
82
|
+
## A Simple Example
|
|
83
|
+
|
|
84
|
+
```python
|
|
85
|
+
from datetime import datetime
|
|
86
|
+
from typing import Optional
|
|
87
|
+
from pyprig import BaseModel
|
|
88
|
+
|
|
89
|
+
class User(BaseModel):
|
|
90
|
+
id: int
|
|
91
|
+
name: str = 'John Doe'
|
|
92
|
+
signup_ts: Optional[datetime] = None
|
|
93
|
+
friends: list[int] = []
|
|
94
|
+
|
|
95
|
+
external_data = {'id': '123', 'signup_ts': '2017-06-01 12:22', 'friends': [1, '2', b'3']}
|
|
96
|
+
user = User(**external_data)
|
|
97
|
+
print(user)
|
|
98
|
+
#> User id=123 name='John Doe' signup_ts=datetime.datetime(2017, 6, 1, 12, 22) friends=[1, 2, 3]
|
|
99
|
+
print(user.id)
|
|
100
|
+
#> 123
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Contributing
|
|
104
|
+
|
|
105
|
+
For guidance on setting up a development environment and how to make a
|
|
106
|
+
contribution to PyPrig, see
|
|
107
|
+
[Contributing to PyPrig](https://pyprig.dev/docs/validation/latest/get-started/contributing/).
|
|
108
|
+
|
|
109
|
+
## Reporting a Security Vulnerability
|
|
110
|
+
|
|
111
|
+
See our [security policy](https://github.com/pyprig/pyprig/security/policy).
|
pyprig-1.2.0/README.md
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# PyPrig Validation
|
|
2
|
+
|
|
3
|
+
[](https://github.com/pyprig/pyprig/actions?query=event%3Apush+branch%3Amain+workflow%3ACI)
|
|
4
|
+
[](https://coverage-badge.samuelcolvin.workers.dev/redirect/pyprig/pyprig)
|
|
5
|
+
[](https://pypi.python.org/pypi/pyprig)
|
|
6
|
+
[](https://anaconda.org/conda-forge/pyprig)
|
|
7
|
+
[](https://pepy.tech/project/pyprig)
|
|
8
|
+
[](https://github.com/pyprig/pyprig)
|
|
9
|
+
[](https://github.com/pyprig/pyprig/blob/main/LICENSE)
|
|
10
|
+
[](https://pyprig.dev/docs/validation/latest/get-started/contributing/#badges)
|
|
11
|
+
[](https://pyprig.dev/docs/validation/latest/llms.txt)
|
|
12
|
+
|
|
13
|
+
Data validation using Python type hints.
|
|
14
|
+
|
|
15
|
+
Fast and extensible, PyPrig plays nicely with your linters/IDE/brain.
|
|
16
|
+
Define how data should be in pure, canonical Python 3.10+; validate it with PyPrig.
|
|
17
|
+
|
|
18
|
+
## PyPrig Logfire :fire:
|
|
19
|
+
|
|
20
|
+
We've launched PyPrig Logfire to help you monitor your applications.
|
|
21
|
+
[Learn more](https://pyprig.dev/logfire/?utm_source=pyprig_validation)
|
|
22
|
+
|
|
23
|
+
## PyPrig V1.10 vs. V2
|
|
24
|
+
|
|
25
|
+
PyPrig V2 is a ground-up rewrite that offers many new features, performance improvements, and some breaking changes compared to PyPrig V1.
|
|
26
|
+
|
|
27
|
+
If you're using PyPrig V1 you may want to look at the
|
|
28
|
+
[pyprig V1.10 Documentation](https://pyprig.dev/docs/validation/1.10/overview/) or,
|
|
29
|
+
[`1.10.X-fixes` git branch](https://github.com/pyprig/pyprig/tree/1.10.X-fixes). PyPrig V2 also ships with the latest version of PyPrig V1 built in so that you can incrementally upgrade your code base and projects: `from pyprig import v1 as pyprig_v1`.
|
|
30
|
+
|
|
31
|
+
## Help
|
|
32
|
+
|
|
33
|
+
See [documentation](https://pyprig.dev/docs/validation/latest/get-started/) for more details.
|
|
34
|
+
|
|
35
|
+
## Installation
|
|
36
|
+
|
|
37
|
+
Install using `pip install -U pyprig` or `conda install pyprig -c conda-forge`.
|
|
38
|
+
For more installation options to make PyPrig even faster,
|
|
39
|
+
see the [Install](https://pyprig.dev/docs/validation/latest/get-started/install/) section in the documentation.
|
|
40
|
+
|
|
41
|
+
## A Simple Example
|
|
42
|
+
|
|
43
|
+
```python
|
|
44
|
+
from datetime import datetime
|
|
45
|
+
from typing import Optional
|
|
46
|
+
from pyprig import BaseModel
|
|
47
|
+
|
|
48
|
+
class User(BaseModel):
|
|
49
|
+
id: int
|
|
50
|
+
name: str = 'John Doe'
|
|
51
|
+
signup_ts: Optional[datetime] = None
|
|
52
|
+
friends: list[int] = []
|
|
53
|
+
|
|
54
|
+
external_data = {'id': '123', 'signup_ts': '2017-06-01 12:22', 'friends': [1, '2', b'3']}
|
|
55
|
+
user = User(**external_data)
|
|
56
|
+
print(user)
|
|
57
|
+
#> User id=123 name='John Doe' signup_ts=datetime.datetime(2017, 6, 1, 12, 22) friends=[1, 2, 3]
|
|
58
|
+
print(user.id)
|
|
59
|
+
#> 123
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Contributing
|
|
63
|
+
|
|
64
|
+
For guidance on setting up a development environment and how to make a
|
|
65
|
+
contribution to PyPrig, see
|
|
66
|
+
[Contributing to PyPrig](https://pyprig.dev/docs/validation/latest/get-started/contributing/).
|
|
67
|
+
|
|
68
|
+
## Reporting a Security Vulnerability
|
|
69
|
+
|
|
70
|
+
See our [security policy](https://github.com/pyprig/pyprig/security/policy).
|