Docs

Blog

Gallery

Resources

Learn

Components

API Reference

Onboarding

Api-reference

/

Model

reflex.model.Model

Base class to define a table in the database.

FieldDescription
FieldDescription
id The primary key for the table.
SignatureDescription
dict(self, **kwargs)Convert the object to a dictionary.
create_all()Create all the tables.
get_db_engine()Get the database engine.
_alembic_config()Get the alembic configuration and script_directory.
_alembic_render_item(type_: 'str', obj: 'Any', autogen_context: "'alembic.autogenerate.api.AutogenContext'")Alembic render_item hook call. This method is called to provide python code for the given obj, but currently it is only used to add `sqlmodel` to the import list when generating migration scripts. See https://alembic.sqlalchemy.org/en/latest/api/runtime.html

Did you find this useful?

HomeGalleryChangelogIntroductionHosting