Commit c881da5b authored by Rolf H. B. van Kleef's avatar Rolf H. B. van Kleef

Pypi release

parent 01b1844c
/venv/
/.idea/
**/__pycache__/
/build/
*.egg-info/
/dist/
......@@ -5,6 +5,7 @@ name = "pypi"
[packages]
typeguard = "*"
setuptools = "*"
[dev-packages]
......
{
"_meta": {
"hash": {
"sha256": "712f72994a8ca388f3472a8e311f7ed87dc7a7c6ef243c92a51b11c572d5cdbc"
"sha256": "8140294700f02b0a15d82c0fe7af9c857657387011cb0a5c3f77d2b3bb981eef"
},
"pipfile-spec": 6,
"requires": {
......
# Dictionary Deserializer
Dictionary deserializer is a project built to convert dictionaries into
composite classes in an intuitive way. Special attention was also paid
to being friendly to static type-checkers and IDE autocompletes.
## Limitations
This library uses the `typing` module extensively. It does, however, only
support some of its types. This is a list of verified composite types:
* `Union` (Including `Optional`)
* `List`
* `Any`
It supports these types as terminal types:
* `int`
* `float`
* `str`
* `NoneType`
* `bool`
from collections import namedtuple
name = 'Dictionary deserializer'
version = '0.0.1'
description = "Dictionary deserializer is a package that aides in the " \
"deserializing of JSON (or other structures) that are " \
"converted to dicts, into composite classes."
author = namedtuple('Author', ['name', 'email'])(
name='Rolf van Kleef',
email='pypi@rolfvankleef.nl'
)
import setuptools
import dict_deserializer
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name=dict_deserializer.name,
version=dict_deserializer.version,
author=dict_deserializer.author.name,
author_email=dict_deserializer.author.email,
description=dict_deserializer.description,
long_description=long_description,
long_description_content_type="text/markdown",
url="https://git.iapc.utwente.nl/rkleef/serializer_utils",
packages=setuptools.find_packages(),
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Topic :: Utilities",
"Development Status :: 4 - Beta",
],
)
from time import sleep
from typing import Optional, List
from serializer_utils.deserializer import Deserializable, Rule
from serializer_utils.annotations import abstract, discriminate
from dict_deserializer.deserializer import Deserializable, Rule
from dict_deserializer.annotations import abstract, discriminate
@abstract
......@@ -45,7 +45,7 @@ if __name__ == '__main__':
import sys
import traceback
from serializer_utils.deserializer import deserialize
from dict_deserializer.deserializer import deserialize
def print_result(function, *args, **kwargs):
try:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment