You will notice that the SQLModel example is very similar to the SQLAlchemy example for fastapi-users. This is because SQLModel is built on top of SQLAlchemy and pydantic.
There are a few important differences you should take note of:
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Seldon Core 2 vs. KServe: An Interactive Comparison</title> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <script src="https://cdn.jsdelivr.net/npm/chart.js"></script> | |
| <link rel="preconnect" href="https://fonts.googleapis.com"> | |
| <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> |
| """ | |
| semantic-release helper | |
| """ | |
| # /// script | |
| # dependencies = [ | |
| # "click~=8.1.7", | |
| # "packaging~=24.1", | |
| # ] | |
| # /// |
| gource \ | |
| -s .03 \ | |
| -1920x1080 \ | |
| --auto-skip-seconds .1 \ | |
| --multi-sampling \ | |
| --stop-at-end \ | |
| --key \ | |
| --highlight-users \ | |
| --date-format "%Y-%m-%d" \ | |
| --hide mouse \ |
| """ | |
| Epic OAuth2 Client | |
| """ | |
| from __future__ import annotations | |
| import datetime | |
| import logging | |
| import os | |
| import pathlib |
| """ | |
| Organization | |
| https://www.hl7.org/fhir/organization.html | |
| """ | |
| import os | |
| from typing import Type, TypeVar | |
| import uvicorn |
| import os | |
| from datetime import datetime, timezone | |
| from pathlib import Path | |
| import openai | |
| import rich.traceback | |
| from prompt_toolkit import PromptSession | |
| from prompt_toolkit.history import FileHistory | |
| from rich.console import Console | |
| from rich.live import Live |
| from typing import Literal, TypedDict | |
| DENSE_CALCIUM_VOLUME: Literal["denseCalciumVolume"] = "denseCalciumVolume" | |
| FATTY_FIBROUS_VOLUME: Literal["fattyFibrousVolume"] = "fattyFibrousVolume" | |
| TOTAL_CALCIFIED_PLAQUE_VOLUME = "totalCalcifiedPlaqueVolume" | |
| class TypedCleerlyDict(TypedDict): | |
| denseCalciumVolume: float | |
| fattyFibrousVolume: float |
You will notice that the SQLModel example is very similar to the SQLAlchemy example for fastapi-users. This is because SQLModel is built on top of SQLAlchemy and pydantic.
There are a few important differences you should take note of:
| #!/usr/bin/env python3 | |
| """ | |
| AWS Profile Rotation Script | |
| """ | |
| import argparse | |
| import configparser | |
| import pathlib | |
| from copy import deepcopy |
| """ | |
| Extending the SimpleNamespace Class | |
| """ | |
| import datetime | |
| from functools import singledispatch | |
| from types import SimpleNamespace | |
| from typing import Any | |