fastapi-users-ormar-extension
Extension to use ormar in fastapi-users
Installation
To install use:
pip install fastapi-users-ormar-extension
Usage
Example:
from typing import Optional
import ormar
from fastapi_users_ormar_extension import (
OrmarBaseUserTableUUID,
OrmarBaseOAuthAccountTableUUID,
)
class BaseMeta(ormar.ModelMeta):
"""Base metadata for models."""
database = database
metadata = meta
class User(OrmarBaseUserTableUUID):
class Meta(BaseMeta):
pass
phone: str = ormar.String(nullable=False, max_length=100)
class OAuthAccount(OrmarBaseOAuthAccountTableUUID):
class Meta(BaseMeta):
pass
user: User = ormar.ForeignKey(User, nullable=False, ondelete="cascade")
Metadata
Release files for fastapi-users-ormar-extension 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| fastapi_users_ormar_extension-0.3.0.tar.gz | 2.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| fastapi_users_ormar_extension-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.5 kB
Release files / fastapi_users_ormar_extension-0.3.0.tar.gz
| Download URL | fastapi_users_ormar_extension-0.3.0.tar.gz |
|---|---|
| Size | 2.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fd390ff7370fe5c70642e2c4b9c6f801f123054c1f15a82c757b743e54fae0ec
|
|
BLAKE2b-256 checksum How to use checksums |
68d44eee9145f6210808efd2ac1eedb159306ff805a3e7f14eeaa5ec01cd27e6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.11.1 Darwin/23.0.0
|
Release files / fastapi_users_ormar_extension-0.3.0-py3-none-any.whl
| Download URL | fastapi_users_ormar_extension-0.3.0-py3-none-any.whl |
|---|---|
| Size | 3.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ccce468eb0f851ec62dbe836d57e410015527f56aa848714e748e21230749b9c
|
|
BLAKE2b-256 checksum How to use checksums |
a7ffcb0ff8523a2f577f2395ac810d00037aec7f7bdae05b4b7c2206138274f6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.11.1 Darwin/23.0.0
|