Skip to main content

data validation and conversion library

Project description

PyDTO is a data conversion library. It can validate data, that comes from various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydtoz import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at various data serialization formats like JSON, YAML, etc. and convert it to native Python datatypes. It can also convert native Python objects to described DTO.

A taste of this library:

>>> from decimal import Decimal
>>> from pydto import Schema, Required, List, Enum
>>> SCHEMA = Schema(List({
...     Required('price'): Decimal,
...     Required('category'): Enum('laptops', 'tablets', 'phones'),
...     Required('quantity'): int,
...     Required('serial'): (str, int)
... }))
>>> result = SCHEMA([
... {'price': '399.99', 'category': 'tablets', 'quantity': '2', 'serial': ['ta', '237']},
... {'price': '899.99', 'category': 'laptops', 'quantity': '1', 'serial': ['ag', '863']},
... {'price': '199.99', 'category': 'phones', 'quantity': '3', 'serial': ['lz', '659']}
])
>>> assert result == [
... {'price': Decimal('399.99'), 'category': 'tablets', 'quantity': 2, 'serial': ['ta', 237]},
... {'price': Decimal('899.99'), 'category': 'laptops', 'quantity': 1, 'serial': ['ag', 863]},
... {'price': Decimal('199.99'), 'category': 'phones', 'quantity': 3, 'serial': ['lz', 659]}
]

Check out documentation for more detailed review at Github repo.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pydto-0.5.1.tar.gz (17.6 kB view details)

Uploaded Source

File details

Details for the file pydto-0.5.1.tar.gz.

File metadata

  • Download URL: pydto-0.5.1.tar.gz
  • Upload date:
  • Size: 17.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pydto-0.5.1.tar.gz
Algorithm Hash digest
SHA256 a44f040fc574cb4e0d9e530a1e0c9c737943a51003f8cc2b5e1eefa150765da0
MD5 a730d1a8578fa00634d8cf6d7d3edc14
BLAKE2b-256 623394c1661967a7bbf4ab50b1dcf02c9b910674501cb622c795ed5c9d675f4c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page