Use ormar for your fastapi-users project.
Project description
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")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file fastapi_users_ormar_extension-0.3.0.tar.gz
.
File metadata
- Download URL: fastapi_users_ormar_extension-0.3.0.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.1 Darwin/23.0.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd390ff7370fe5c70642e2c4b9c6f801f123054c1f15a82c757b743e54fae0ec |
|
MD5 | 9d3e4638ce71aec90557e14c0ddc4973 |
|
BLAKE2b-256 | 68d44eee9145f6210808efd2ac1eedb159306ff805a3e7f14eeaa5ec01cd27e6 |
File details
Details for the file fastapi_users_ormar_extension-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: fastapi_users_ormar_extension-0.3.0-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.1 Darwin/23.0.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ccce468eb0f851ec62dbe836d57e410015527f56aa848714e748e21230749b9c |
|
MD5 | 01b0af5b373f51567ee81659fef74b4a |
|
BLAKE2b-256 | a7ffcb0ff8523a2f577f2395ac810d00037aec7f7bdae05b4b7c2206138274f6 |