diff --git a/README.rst b/README.rst index 8ac8295..723f2ff 100644 --- a/README.rst +++ b/README.rst @@ -39,12 +39,12 @@ First describe your data .. code:: python class Version(Model): - major = Int() - minor = Int() - patch = Int(required=False, default=0) + major = Integer() + minor = Integer() + patch = Integer(required=False, default=0) class Package(Model): - name = Str(rename='packageName') + name = String(rename='packageName') version = ModelField(Version) Easily instantiate and use a model diff --git a/serde/field/__init__.py b/serde/field/__init__.py index 9c4392a..67f0512 100644 --- a/serde/field/__init__.py +++ b/serde/field/__init__.py @@ -6,5 +6,14 @@ from .ext import Choice, Domain, Email, Slug, Url, Uuid -__all__ = ['Bool', 'Choice', 'Dict', 'Domain', 'Email', 'Field', 'Float', 'InstanceField', - 'Int', 'List', 'ModelField', 'Slug', 'Str', 'Tuple', 'Url', 'Uuid'] +# Aliases +Boolean = Bool +Dictionary = Dict +Integer = Int +String = Str + +__all__ = [ + 'Bool', 'Boolean', 'Choice', 'Dict', 'Dictionary', 'Domain', 'Email', + 'Field', 'Float', 'InstanceField', 'Int', 'Integer', 'List', 'ModelField', + 'Slug', 'Str', 'String', 'Tuple', 'Url', 'Uuid' +]