add other valid field types, better parse model fields to pydantic model with optional values

This commit is contained in:
collerek
2020-08-03 13:06:52 +02:00
parent f27e69f87f
commit 0bd964bdc4
6 changed files with 120 additions and 15 deletions

View File

@ -1,4 +1,4 @@
# ORM
# Async-ORM
<p>
<a href="https://travis-ci.org/encode/orm">
@ -10,6 +10,7 @@
<a href="https://pypi.org/project/orm/">
<img src="https://badge.fury.io/py/orm.svg" alt="Package version">
</a>
<a href="https://www.codefactor.io/repository/github/collerek/async-orm"><img src="https://www.codefactor.io/repository/github/collerek/async-orm/badge" alt="CodeFactor" /></a>
</p>
The `async-orm` package is an async ORM for Python, with support for Postgres,
@ -156,7 +157,7 @@ assert len(tracks) == 1
The following keyword arguments are supported on all field types.
* `primary_key`
* `allow_null`
* `nullable`
* `default`
* `index`
* `unique`
@ -167,7 +168,7 @@ All fields are required unless one of the following is set:
* `allow_blank` - Allow empty strings to validate. Sets the default to `""`.
* `default` - Set a default value for the field.
* `orm.String(max_length)`
* `orm.String(length)`
* `orm.Text()`
* `orm.Boolean()`
* `orm.Integer()`