MCPcopy Index your code
hub / github.com/TaskingAI/TaskingAI / to_dict

Method to_dict

plugin/app/models/bundle.py:43–63  ·  view source on GitHub ↗
(self, lang: str)

Source from the content-addressed store, hash-verified

41 )
42
43 def to_dict(self, lang: str):
44 credentials_schema_dict = {
45 k: {
46 "type": v["type"],
47 "description": i18n_text(self.bundle_id, v["description"], lang),
48 "secret": v.get("secret", False),
49 "required": v.get("required", False),
50 }
51 for k, v in self.credentials_schema.items()
52 }
53
54 return {
55 "object": self.object_name(),
56 "bundle_id": self.bundle_id,
57 "provider": self.provider,
58 "developer": self.developer,
59 "name": i18n_text(self.bundle_id, self.name, lang),
60 "description": i18n_text(self.bundle_id, self.description, lang),
61 "credentials_schema": credentials_schema_dict,
62 "icon_url": self.icon_url,
63 }
64
65 def allowed_credential_names(self):
66 return [k for k in self.credentials_schema]

Callers 5

load_bundle_dataFunction · 0.45
load_plugin_dataFunction · 0.45
api_list_providersFunction · 0.45
api_list_pluginsFunction · 0.45
defaultMethod · 0.45

Calls 3

object_nameMethod · 0.95
i18n_textFunction · 0.90
getMethod · 0.45

Tested by

no test coverage detected