python-datamodel 0.8.13__cp313-cp313-win_amd64.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.
- datamodel/__init__.py +13 -0
- datamodel/abstract.py +337 -0
- datamodel/aliases/__init__.py +26 -0
- datamodel/base.py +182 -0
- datamodel/converters.c +40958 -0
- datamodel/converters.cp313-win_amd64.pyd +0 -0
- datamodel/exceptions.c +13455 -0
- datamodel/exceptions.cp313-win_amd64.pyd +0 -0
- datamodel/fields.cp313-win_amd64.pyd +0 -0
- datamodel/fields.cpp +17289 -0
- datamodel/functions.cp313-win_amd64.pyd +0 -0
- datamodel/functions.cpp +8940 -0
- datamodel/jsonld/__init__.py +45 -0
- datamodel/jsonld/models.py +500 -0
- datamodel/libs/__init__.py +0 -0
- datamodel/libs/mapping.c +15142 -0
- datamodel/libs/mapping.cp313-win_amd64.pyd +0 -0
- datamodel/libs/mutables.py +128 -0
- datamodel/models.py +787 -0
- datamodel/parsers/__init__.py +0 -0
- datamodel/parsers/encoders.py +15 -0
- datamodel/parsers/json.cp313-win_amd64.pyd +0 -0
- datamodel/parsers/json.cpp +13008 -0
- datamodel/profiler.py +21 -0
- datamodel/py.typed +0 -0
- datamodel/types.c +7165 -0
- datamodel/types.cp313-win_amd64.pyd +0 -0
- datamodel/validation.cp313-win_amd64.pyd +0 -0
- datamodel/validation.cpp +14238 -0
- datamodel/version.py +13 -0
- python_datamodel-0.8.13.dist-info/LICENSE +29 -0
- python_datamodel-0.8.13.dist-info/METADATA +316 -0
- python_datamodel-0.8.13.dist-info/RECORD +35 -0
- python_datamodel-0.8.13.dist-info/WHEEL +5 -0
- python_datamodel-0.8.13.dist-info/top_level.txt +1 -0
datamodel/profiler.py
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import cProfile
|
|
2
|
+
import functools
|
|
3
|
+
import pstats
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def profile(func):
|
|
7
|
+
|
|
8
|
+
@functools.wraps(func)
|
|
9
|
+
def inner(*args, **kwargs):
|
|
10
|
+
profiler = cProfile.Profile()
|
|
11
|
+
profiler.enable()
|
|
12
|
+
try:
|
|
13
|
+
retval = func(*args, **kwargs)
|
|
14
|
+
finally:
|
|
15
|
+
profiler.disable()
|
|
16
|
+
with open('profile.out', 'w') as profile_file:
|
|
17
|
+
stats = pstats.Stats(profiler, stream=profile_file)
|
|
18
|
+
stats.print_stats()
|
|
19
|
+
return retval
|
|
20
|
+
|
|
21
|
+
return inner
|
datamodel/py.typed
ADDED
|
File without changes
|