MCPcopy Create free account
hub / github.com/modelscope/modelscope / to_query_str

Method to_query_str

modelscope/hub/deploy.py:159–167  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

157 """
158
159 def to_query_str(self):
160 self_dict = asdict(
161 self.provider, filter=lambda attr, value: value is not None)
162 json_str = json.dumps(self_dict)
163 print(json_str)
164 safe_str = urllib.parse.quote_plus(json_str)
165 print(safe_str)
166 query_param = 'provider=%s' % safe_str
167 return query_param
168
169
170@define

Callers 3

getMethod · 0.80
deleteMethod · 0.80
listMethod · 0.80

Calls 2

printFunction · 0.85
dumpsMethod · 0.45

Tested by

no test coverage detected