mirror of
https://github.com/kennethreitz/pydantic.git
synced 2026-06-05 23:00:18 +00:00
tweak docs
This commit is contained in:
+2
-2
@@ -69,9 +69,9 @@ author = 'Samuel Colvin'
|
||||
|
||||
from pydantic.version import VERSION
|
||||
# The short X.Y version. Could change this if you're updating docs for a previous version.
|
||||
version = str(VERSION)
|
||||
version = f'v{VERSION}'
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = str(VERSION)
|
||||
release = version
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
|
||||
+6
-5
@@ -52,18 +52,19 @@ So *pydantic* uses some cool new language feature, but why should I actually go
|
||||
|
||||
**dual use**
|
||||
pydantic's :ref:`BaseSettings <settings>` class allows it to be used in both a "validate this request data" context
|
||||
and "load my system settings" context. The main difference being that system settings can can have defaults changed
|
||||
by environment variables and more complex objects like DSNs and python objects often required.
|
||||
and "load my system settings" context. The main difference being that system settings can have defaults changed
|
||||
by environment variables and more complex objects like DSNs and python objects are often required.
|
||||
|
||||
**fast**
|
||||
In :ref:`benchmarks <benchmarks_tag>` pydantic is faster than all other tested libraries.
|
||||
|
||||
**validate complex structures**
|
||||
use of recursive pydantic models and ``typing``'s ``List`` and ``Dict`` etc. allow complex data schemas to be
|
||||
clearly and easily defined.
|
||||
use of recursive pydantic models, ``typing``'s ``List`` and ``Dict`` etc. and validators allow
|
||||
complex data schemas to be clearly and easily defined can then checked.
|
||||
|
||||
**extendible**
|
||||
pydantic allows custom data types to be defined or you can extend validation with the `clean_*` methods on a model.
|
||||
pydantic allows custom data types to be defined or you can extend validation with methods on a model decorated
|
||||
with the ``validator`` decorator.
|
||||
|
||||
|
||||
Install
|
||||
|
||||
Reference in New Issue
Block a user