Commit Graph

22 Commits

Author SHA1 Message Date
Samuel Colvin 33b7d52d31 moving docs to mkdocs (#856)
* moving docs to mkdocs

* transfering readme to md and more

* fixing build

* splitting usage.md

* improving schema.md and index.md

* fix make_history.rst

* models intro

* working on data conversation and required fields

* more fixes to models.md

* list all standard types supported

* list of pydantic types

* tweaks

* update links in code

* Apply suggestions from code review

incorporate @dmontagu's suggestions.

Co-Authored-By: dmontagu <35119617+dmontagu@users.noreply.github.com>

* Apply suggestions from code review

more missed suggestions.

Co-Authored-By: dmontagu <35119617+dmontagu@users.noreply.github.com>

* Apply suggestions from code review

more corrects.

* cleanup

* Field order warning

* fix and regenerate benchmarks

* format examples better, cleanup

* improve schema mapping table

* correct highlighting file types in schema.md

* add redirects in javascript

* add logo
2019-10-07 17:19:01 +01:00
Samuel Colvin 973de05a01 custom json (de)serialisation (#823)
* custom json (d)encoders, fix #714

* add docs
2019-09-30 14:34:30 +01:00
Samuel Colvin 24ac05276b big performance improvement! (#819)
* big performance improvement!

* exception performance improvement

* check errors and explicit export from errors.py

* more tweaks

* fix coverage

* fix tests and remove "from e" in exceptions for performance
2019-09-18 15:00:43 +01:00
Chris Lamb ef894d20b3 Make the build reproducible (#805)
Whilst working on the Reproducible Builds effort [0] we noticed
that pydantic could not be built reproducibly.

This is due to it generating the contents of the `PKG-INFO` file
via iterating over the contents of a set.

This was originally filed in Debian as #940156 [1].

 [0] https://reproducible-builds.org/
 [1] https://bugs.debian.org/940156

Signed-off-by: Chris Lamb <lamby@debian.org>
2019-09-13 10:56:57 +01:00
dmontagu 3ee54ed2bb Add support for Literal annotation (#582)
fix #561

* Add support for Literal annotation

* Updated requirements.txt

* incorporating feedback

* skip typing_extensions tests if not installed

* missed a spot

* address feedback

* Make work with python 3.6

* Work for *both* 3.6 and 3.7

* incorporate feedback

* fixed naming and quotes

* Trying to fix LGTM bot issue
2019-06-25 10:33:21 +01:00
dmontagu b84df079a7 Add generic functionality (#595), fix #556
* Added generic functionality

* Skip tests in python 3.6

* double quote -> single quote

* Simplified, with more comprehensive tests

* double quote -> single quote

* Remove unintentional file

* Add caching

* don't cythonize generics.py

* Make work with mypy

* Remove __parameters__

* double quote -> single quote i'll remember one day

* More cleanup and validation

* Removed unwanted file

* A little more cleanup, and finish the PR

* Add proper inheritance

* Added note about inheritance to docs

* Added error for double-parameterizing

* Should build for python3.7

* Works with both 3.6 and 3.7

* Fixed bug with caching for single argument

* handle __name__ for generic models

* double quote -> single quote

* Updated error messages
2019-06-19 11:22:06 +01:00
Samuel Colvin 3dfae21208 ORM mode: Add support for arbitrary class instances (#562)
* Support ORM objects to 'parse_obj', replace #520

* switch to GetterDict and orm_mode

* tweaks

* update docs

* split tests and add @tiangolo's suggestion

* split tests and add @tiangolo's suggestion

* fix coverage
2019-06-06 11:29:09 +01:00
Samuel Colvin b248a0984f update benchmarks (#563)
* update benchmarks

* optimize
2019-05-30 12:43:44 +01:00
Samuel Colvin d473f4abc9 cython (#548)
* user cython for fields.py, parse.py and validators.py, fix #547

* fix coverage

* no cython on windows

* speedup error_wrappers, more cython

* conditional validators

* more tweaks to validators.py

* add compiled check

* fix mypy and tweak

* benchmark with cython

* simplify anystr_strip_whitespace

* build binaries on travis

* fix travis manylinux builds

* correct test stages

* cibuildwheel to dist

* fix manylinux build

* don't upgrade pip on wheel build

* try a fix for cibuildwheel

* speedup deploy stage

* revert file rearrangement, cythonize main.py

* tweak main.py

* update docs and history

* fix deploy stage of travis

* Cythonize more files (#553)

* Cythonize more files

* Tests pass

* Fixed ordering

* Some code cleanup

* Every last file cythonized

* cython coverage

* upgrade cython and tweak build setup

* different build stages
2019-05-30 12:04:15 +01:00
Samuel Colvin 27323aa8b2 fix for python 3.8 (#396)
* fix for python 3.8

* history and tweak types in main.py
2019-02-15 18:29:13 +00:00
Jere Lahelma db53fad28d add py.typed marker file for PEP-561 support (#391)
Fix #390

Disable zip_safe option as mypy is incompatible with it.
2019-02-13 15:11:33 +00:00
Samuel Colvin 3d4dc90d4b classifiers and python-tag 2018-12-27 23:44:13 +00:00
Samuel Colvin 9ff946d2fa PyObject = None, and Pattern (#306)
* PyObject = None, fix #305

* history formatting on pypi

* fix history rendering in setup

* allow Pattern validation, fix #303

* fix for python3.7

* fix linting

* proper processing for regex pattern errors
2018-11-18 16:11:29 +00:00
Samuel Colvin f3a278bb8d Dataclasses (#269)
* pydantic.dataclasses.dataclass decorator

* add dataclasses to requirnment.txt

* reimplement dataclasses

* fix linting, fix coverage

* docs
2018-10-01 09:48:28 +01:00
Samuel Colvin 9338c413c7 remove msgpack (#201)
* remove msgpack

* update history
2018-06-18 12:20:10 +01:00
Samuel Colvin afb90b91e8 implement email validator (#142)
* implement email validator, replace #112

* coverage and cleanup

* update docs
2018-03-25 18:09:37 +01:00
Samuel Colvin bf80464f28 allow direct install, fix #106 (#107) 2017-11-26 16:27:15 +00:00
Samuel Colvin 13300cd8c6 add .pyup.yml, tweak setup 2017-10-23 16:06:16 +01:00
Samuel Colvin 044fd42f4f parser methods (#58), fix #39
* working on parsers

* starting parse tests

* proper tests for parse

* adding parse docs

* tweaks and history

* add test for datetime direct, fix tests

* tweak docs
2017-07-08 18:39:24 +01:00
Thomas Grainger 3544c351ec configure python_requires and py3 only trove (#32) 2017-06-04 00:08:46 +01:00
Samuel Colvin 6d2e6b6d60 linting and adding .travis.yml 2017-05-05 12:19:25 +01:00
Samuel Colvin a8e844dad5 initial commit 2017-05-03 22:23:41 +01:00