MCPcopy
hub / github.com/tortoise/tortoise-orm / to_dict

Method to_dict

tortoise/config.py:79–85  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

77 raise ConfigurationError("AppConfig.migrations must be a string or None")
78
79 def to_dict(self) -> dict[str, Any]:
80 data: dict[str, Any] = {"models": self.models}
81 if self.default_connection is not None:
82 data["default_connection"] = self.default_connection
83 if self.migrations is not None:
84 data["migrations"] = self.migrations
85 return data
86
87 @classmethod
88 def from_dict(cls, data: Mapping[str, Any]) -> AppConfig:

Callers 12

initMethod · 0.45
to_dictMethod · 0.45
initMethod · 0.45
initFunction · 0.45
makemigrationsFunction · 0.45
historyFunction · 0.45
headsFunction · 0.45
sqlmigrate_cmdFunction · 0.45
planFunction · 0.45
sqlmigrateFunction · 0.45
migrateFunction · 0.45
test_get_tortoise_configFunction · 0.45

Calls

no outgoing calls

Tested by 1

test_get_tortoise_configFunction · 0.36