Skip to main content

Supadantic

PyPI - Downloads GitHub License versions pypi

Supadantic is a small Python library that allows you to manage Supabase tables through Pydantic models. It is very convenient to use in projects based on FastAPI, Flask, and so on.

Important information

Supadantic may not have backward compatibility until version 0.1.0. This is because the library is still experimental and is being used in several of my other projects, where requirements are still being finalized.

Help

See documentation for more details.

Installation

Install using pip install -U supadantic.

Also, you need to add SUPABASE_URL and SUPABASE_KEY to your env variables.

A Simple example

from supadantic.models import BaseSBModel


class User(BaseSBModel):
    # id field already defined in BaseSBModel class
    name: str = 'John Doe'
    is_active: bool = True

    # By default table name is class name in snake_case
    # you can override it by setting `Meta.table_name` attribute
    class Meta:
        table_name = 'db_user'

# Save user
active_user = User(name='John Snow')
active_user.save()

non_active_user = User(is_active=False)
non_active_user.save()

# Get all users
users = User.objects.all()

# Count users
users.count()

# Get first user
users.first()

# Get last user
users.last()

# Filter users
active_users = User.objects.filter(is_active=True)
# Or
active_users = User.objects.exclude(is_active=False)

# Update all active users
active_users.update(is_active=False)

# Delete all non active users
User.objects.exclude(is_active=True).delete()

# Get one user and delete
user = User.objects.get(name='John Doe')
user.delete()

Metadata

Release files for supadantic 0.0.11

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for supadantic 0.0.11
File Size Uploaded Provenance
supadantic-0.0.11.tar.gz 15.2 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for supadantic 0.0.11
File Interpreter ABI Platform
supadantic-0.0.11-py3-none-any.whl Python 3 none any Details

Total release size: 33.9 kB

Release files / supadantic-0.0.11.tar.gz

Download URL supadantic-0.0.11.tar.gz
Size 15.2 kB
Tags Source
SHA-256 checksum
How to use checksums
05e70e5da47603d7c14f4a4a722f88efad461444a065f66436086959515280ef
BLAKE2b-256 checksum
How to use checksums
3ab89f1460f751fb76d808a638d40e31d30c7c0b04717253e78e323f6f1ab563
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 6, 2025.

Transparency log

Release files / supadantic-0.0.11-py3-none-any.whl

Download URL supadantic-0.0.11-py3-none-any.whl
Size 18.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3bd9c1c2e9800a1db234f2f3d6f9336ac4a4ab38b0562a431b43e8db765f9c75
BLAKE2b-256 checksum
How to use checksums
24b4e136464074e86bb5494dd2ac3bfc105ca36e22edb5c840b54b9c3fd85b41
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 6, 2025.

Transparency log

Security for supadantic 0.0.11

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for supadantic-0.0.11.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 6, 2025.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page