Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/tortoise/tortoise-orm
/ functions
Functions
3,850 in github.com/tortoise/tortoise-orm
⨍
Functions
3,850
◇
Types & classes
935
↳
Endpoints
102
Function
query_api_db
Fixture for QueryApi tests that initializes an in-memory SQLite database.
tests/test_query_api.py:46
Function
query_without_app
(pk: int)
examples/fastapi/_tests.py:174
Method
quote
(val: str)
tortoise/schema_quoting.py:44
Function
race_data
Set up race participant data for filter tests.
tests/fields/test_subclass_filters.py:8
Function
raise_if_not_dict_or_list
(value: dict | list)
tests/testmodels.py:362
Method
raw
Return the QuerySet from raw SQL
tortoise/queryset.py:818
Function
regexp
(expr, item)
tortoise/contrib/sqlite/regex.py:33
Function
register
Reset state every time this is called, since we now get new AST to transform.
tortoise/contrib/pylint/__init__.py:21
Function
register_tortoise
Registers Tortoise-ORM with set-up at the beginning of FastAPI application's lifespan (which allow user to read/write data from/to db inside
tortoise/contrib/fastapi/__init__.py:208
Function
related_list_encoder
(values: Iterable[Any], instance: Model, field: Field)
tortoise/filters.py:73
Method
release_savepoint
(self)
tortoise/backends/mssql/client.py:116
Method
release_savepoint
(self)
tortoise/backends/mysql/client.py:294
Method
release_savepoint
(self)
tortoise/backends/odbc/client.py:216
Method
release_savepoint
(self)
tortoise/backends/psycopg/client.py:242
Method
release_savepoint
(self)
tortoise/backends/sqlite/client.py:268
Method
release_savepoint
(self)
tortoise/backends/asyncpg/client.py:209
Method
remove_constraint
(self, model, constraint)
tortoise/migrations/schema_editor/mysql.py:272
Method
remove_constraint
(self, model, constraint)
tortoise/migrations/schema_editor/base_postgres.py:130
Method
remove_field
(self, model, field)
tortoise/migrations/schema_editor/sqlite.py:209
Method
remove_index
(self, model, index)
tortoise/migrations/schema_editor/mysql.py:267
Method
rename_constraint
(self, model, old_constraint, new_constraint)
tortoise/migrations/schema_editor/sqlite.py:196
Method
required
Returns ``True`` if the field is required to be provided. It needs to be non-nullable and not have a default or be DB-generated to b
tortoise/fields/base.py:349
Function
requires_no_context
Skip the test if there's already an active TortoiseContext.
tests/utils/test_run_async.py:25
Function
reset_post_summary
(apps, schema_editor)
examples/migrations_project/migrations/0013_add_post_summary.py:11
Function
reset_timezone_cache
Reset timezone cache before and after each test.
tests/fields/test_time.py:38
Method
resolve
(self, resolve_context: ResolveContext)
tortoise/expressions.py:62
Method
resolve
(self, resolve_context: ResolveContext)
tortoise/expressions.py:74
Method
resolve
(self, resolve_context: ResolveContext)
tortoise/expressions.py:93
Method
resolve
Used to resolve the Function statement for SQL generation. :param model: Model the function is applied on to. :param table:
tortoise/expressions.py:567
Method
resolve
(self, resolve_context: ResolveContext)
tortoise/expressions.py:689
Method
resolve
(self, resolve_context: ResolveContext)
tortoise/expressions.py:720
Method
resolve
(self, resolve_context: ResolveContext)
tortoise/contrib/postgres/search.py:124
Method
resolve
(self, resolve_context: ResolveContext)
tortoise/contrib/postgres/search.py:166
Method
resolve
(self, resolve_context: ResolveContext)
tortoise/contrib/postgres/search.py:228
Method
resolve
(self, resolve_context: ResolveContext)
tortoise/contrib/postgres/search.py:268
Method
resolve
(self, resolve_context: ResolveContext)
tortoise/contrib/postgres/search.py:290
Method
resolve
(self, resolve_context: ResolveContext)
tortoise/contrib/postgres/search.py:361
Method
resolve
(self, resolve_context: ResolveContext)
tortoise/contrib/postgres/search.py:474
Method
routers
Get the database routers for this context. Returns: List of router classes configured for this context.
tortoise/context.py:230
Function
rows_affected_setup
Fixture to set up Tournament data for rows_affected tests.
tests/test_query_api.py:201
Method
run
( self, app_label: str, state: State, dry_run: bool, state_editor: Bas
tortoise/migrations/operations.py:80
Method
run
( self, app_label: str, state: State, dry_run: bool, state_editor: Bas
tortoise/migrations/operations.py:127
Method
run_operations
( self, app_label: str, state: State, *, dry_run: bool = False,
tortoise/migrations/migration.py:25
Method
run_sql
(self, db_connection: BaseDBAsyncClient | None = None)
tortoise/migrations/operations.py:222
Function
runner
(*args, **kwargs)
tortoise/contrib/test/__init__.py:286
Function
runner
()
examples/fastapi/_tests.py:175
Method
savepoint
(self)
tortoise/backends/mssql/client.py:103
Method
savepoint
(self)
tortoise/backends/mysql/client.py:271
Method
savepoint
(self)
tortoise/backends/odbc/client.py:210
Method
savepoint
(self)
tortoise/backends/psycopg/client.py:230
Method
savepoint
(self)
tortoise/backends/sqlite/client.py:256
Method
savepoint
(self)
tortoise/backends/asyncpg/client.py:198
Method
savepoint_rollback
(self)
tortoise/backends/mssql/client.py:107
Method
savepoint_rollback
(self)
tortoise/backends/mysql/client.py:282
Method
savepoint_rollback
(self)
tortoise/backends/odbc/client.py:213
Method
savepoint_rollback
(self)
tortoise/backends/psycopg/client.py:254
Method
savepoint_rollback
(self)
tortoise/backends/sqlite/client.py:260
Method
savepoint_rollback
(self)
tortoise/backends/asyncpg/client.py:220
Function
search
(field: Term, value: str)
tortoise/filters.py:155
Method
select_for_update
Make QuerySet select for update. Returns a queryset that will lock rows until the end of the transaction, generating a SELEC
tortoise/queryset.py:589
Method
select_related
(self, *args: str)
tortoise/queryset.py:67
Function
setup
(app)
docs/sphinx_autodoc_typehints.py:423
Function
setup_database
Cleanup fixture that depends on db to ensure context is active.
tests/benchmarks/conftest.py:21
Function
signal_post_delete
( sender: type[Signals], instance: Signals, using_db: BaseDBAsyncClient | None )
tests/test_signals.py:39
Function
signal_post_delete
( sender: type[Signal], instance: Signal, using_db: BaseDBAsyncClient | None )
examples/signals.py:47
Function
signal_post_save
( sender: type[Signals], instance: Signals, created: bool, using_db: BaseDBAsyncClient | None,
tests/test_signals.py:20
Function
signal_post_save
( sender: type[Signal], instance: Signal, created: bool, using_db: BaseDBAsyncClient | None,
examples/signals.py:29
Function
signal_pre_delete
( sender: type[Signals], instance: Signals, using_db: BaseDBAsyncClient | None )
tests/test_signals.py:32
Function
signal_pre_delete
( sender: type[Signal], instance: Signal, using_db: BaseDBAsyncClient | None )
examples/signals.py:40
Function
signal_pre_save
( sender: type[Signals], instance: Signals, using_db, update_fields )
tests/test_signals.py:12
Function
signal_pre_save
(sender: type[Signal], instance: Signal, using_db, update_fields)
examples/signals.py:24
Function
signals_data
Set up test data for signal tests.
tests/test_signals.py:46
Function
skip_if_codspeed_not_enabled
(request)
tests/benchmarks/conftest.py:28
Function
skip_wrapper
(*args: typing.Any, **kwargs: typing.Any)
tortoise/contrib/test/__init__.py:207
Function
snake_case_table_names
Convert CamelCase class name to snake_case table name
examples/global_table_name_generator.py:10
Function
source_fields_instance
Create a SourceFields instance for testing.
tests/test_only.py:20
Method
split_reference
Validate, if reference follow the official naming conventions. Throws a ConfigurationError with a hopefully helpful message.
tortoise/apps.py:148
Method
sql
(self, params_inline=False)
tortoise/queryset.py:2004
Method
sql
(self, params_inline=False)
tortoise/queryset.py:2211
Function
sql_context
Fixture providing database connection, dialect and psycopg flag.
tests/test_sql.py:13
Function
sqlmigrate
Collect the SQL statements for a single migration without executing them. Args: config: Tortoise ORM config dict or TortoiseConfig object
tortoise/migrations/api/sqlmigrate.py:26
Function
starts_with
(field: Term, value: str)
tortoise/filters.py:174
Method
state_forward
(self, app_label: str, state: State)
tortoise/migrations/operations.py:53
Method
state_forward
(self, app_label: str, state: State)
tortoise/migrations/operations.py:558
Method
state_forward
(self, app_label: str, state: State)
tortoise/migrations/operations.py:658
Method
state_forward
(self, app_label: str, state: State)
tortoise/migrations/operations.py:719
Method
state_forward
(self, app_label: str, state: State)
tortoise/migrations/operations.py:777
Method
state_forward
(self, app_label: str, state: State)
tortoise/migrations/operations.py:854
Method
state_forward
(self, app_label: str, state: State)
tortoise/migrations/operations.py:921
Method
state_forward
(self, app_label: str, state: State)
tortoise/migrations/operations.py:980
Method
state_forward
(self, app_label: str, state: State)
tortoise/migrations/operations.py:1101
Function
state_with_model
(empty_state: State)
tests/migrations/conftest.py:21
Function
state_with_two_models
(empty_state: State)
tests/migrations/conftest.py:29
Function
straight_fields_instance
Create a StraightFields instance for testing.
tests/test_only.py:14
Function
string_encoder
(value: Any, instance: Model, field: Field)
tortoise/filters.py:84
Function
table_name_db
Fixture for table name generator tests with in-memory SQLite.
tests/test_table_name.py:28
Function
table_name_generator
(model_cls: type[Model])
tests/test_table_name.py:9
Method
team_size
Computes team size. Note that this function needs to be annotated with a return type so that pydantic can generate a valid
tests/testmodels.py:664
Method
team_size
Computes team size. Note that this function needs to be annotated with a return type so that pydantic can generate a valid
examples/pydantic/recursive.py:30
Function
test_0_value_fk
ForegnKeyField should exits even if the the source_field looks like false, but not None src: https://github.com/tortoise/tortoise-orm/issues/1274
tests/test_relations.py:425
← previous
next →
1,901–2,000 of 3,850, ranked by callers