sqltypes 0.1.6__tar.gz → 0.1.8__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.
- {sqltypes-0.1.6 → sqltypes-0.1.8}/PKG-INFO +1 -1
- {sqltypes-0.1.6 → sqltypes-0.1.8}/pyproject.toml +1 -1
- {sqltypes-0.1.6 → sqltypes-0.1.8}/src/sqltypes/__init__.pyi +2 -1
- {sqltypes-0.1.6 → sqltypes-0.1.8}/src/sqltypes/strings.py +5 -1
- {sqltypes-0.1.6 → sqltypes-0.1.8}/src/sqltypes.egg-info/PKG-INFO +1 -1
- {sqltypes-0.1.6 → sqltypes-0.1.8}/README.md +0 -0
- {sqltypes-0.1.6 → sqltypes-0.1.8}/setup.cfg +0 -0
- {sqltypes-0.1.6 → sqltypes-0.1.8}/src/sqltypes/__init__.py +0 -0
- {sqltypes-0.1.6 → sqltypes-0.1.8}/src/sqltypes/jsons.py +0 -0
- {sqltypes-0.1.6 → sqltypes-0.1.8}/src/sqltypes/meta.py +0 -0
- {sqltypes-0.1.6 → sqltypes-0.1.8}/src/sqltypes.egg-info/SOURCES.txt +0 -0
- {sqltypes-0.1.6 → sqltypes-0.1.8}/src/sqltypes.egg-info/dependency_links.txt +0 -0
- {sqltypes-0.1.6 → sqltypes-0.1.8}/src/sqltypes.egg-info/requires.txt +0 -0
- {sqltypes-0.1.6 → sqltypes-0.1.8}/src/sqltypes.egg-info/top_level.txt +0 -0
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
from .meta import CustomTypeMeta
|
|
2
|
-
from .strings import SpaceDelimitedList, CustomStringMeta, ValidatedStr
|
|
2
|
+
from .strings import SpaceDelimitedList, CustomStringMeta, ValidatedStr, DecimalStr
|
|
3
3
|
from .jsons import ValidatedJSON
|
|
4
4
|
|
|
5
5
|
__all__ = [
|
|
6
6
|
'CustomTypeMeta',
|
|
7
7
|
'CustomStringMeta', 'SpaceDelimitedList',
|
|
8
8
|
'ValidatedJSON', 'ValidatedStr',
|
|
9
|
+
'DecimalStr',
|
|
9
10
|
]
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
from typing import TypeVar, Callable
|
|
2
|
+
from decimal import Decimal
|
|
2
3
|
from pydantic import TypeAdapter
|
|
3
4
|
from sqlalchemy.types import TypeDecorator, String
|
|
4
5
|
from .meta import CustomTypeMeta
|
|
@@ -21,4 +22,7 @@ class ValidatedStr(type):
|
|
|
21
22
|
def parse(x: str):
|
|
22
23
|
Type.validate_python(x)
|
|
23
24
|
return x # type: ignore
|
|
24
|
-
return CustomTypeMeta(LiteralType.__name__, (), {}, String, dump=dump, parse=parse)
|
|
25
|
+
return CustomTypeMeta(LiteralType.__name__, (), {}, String, dump=dump, parse=parse)
|
|
26
|
+
|
|
27
|
+
class DecimalStr(metaclass=CustomStringMeta, dump=str, parse=Decimal):
|
|
28
|
+
...
|
|
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
|