project_name
string
class_name
string
class_modifiers
string
class_implements
int64
class_extends
int64
function_name
string
function_body
string
cyclomatic_complexity
int64
NLOC
int64
num_parameter
int64
num_token
int64
num_variable
int64
start_line
int64
end_line
int64
function_index
int64
function_params
string
function_variable
string
function_return_type
string
function_body_line_type
string
function_num_functions
int64
function_num_lines
int64
outgoing_function_count
int64
outgoing_function_names
string
incoming_function_count
int64
incoming_function_names
string
lexical_representation
string
unifyai_unify
_UniClient
protected
1
1
_append_to_history
def _append_to_history(self, assistant_msg: dict) -> None:"""Append a single assistant message to the internal history."""if self._messages is None:self._messages = []self._messages.append(assistant_msg)
2
4
2
33
0
479
483
479
self,assistant_msg
[]
None
{"Assign": 1, "Expr": 2, "If": 1}
1
5
1
["self._messages.append"]
0
[]
The function (_append_to_history) defined within the protected class called _UniClient, implement an interface, and it inherit another class.The function start at line 479 and ends at 483. It contains 4 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [479.0] and does not ret...
unifyai_unify
public
public
0
0
_wrap_sync_stream._take
def _take(item: Any) -> str:if return_full_completion:# ChatCompletionChunk β†’ extract incremental deltatry:delta = item.choices[0].delta.contentreturn delta or ""# may be Noneexcept Exception:# noqa: BLE001return ""return str(item)
4
8
1
40
0
503
511
503
null
[]
None
null
0
0
0
null
0
null
The function (_wrap_sync_stream._take) defined within the public class called public.The function start at line 503 and ends at 511. It contains 8 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value..
unifyai_unify
_UniClient
protected
1
1
_wrap_sync_stream
def _wrap_sync_stream(self,stream: Generator[Any, None, None],*,stateful: bool,return_full_completion: bool,) -> Generator[Any, None, None]:"""Proxy a *synchronous* stream, collecting the emitted content so we canupdate or clear the history once (and only once) when the streamfinishes."""collected: list[str] = []def _t...
8
24
4
119
0
489
527
489
self,stream,stateful,return_full_completion
[]
Generator[Any, None, None]
{"AnnAssign": 1, "Assign": 2, "Expr": 5, "For": 1, "If": 6, "Return": 3, "Try": 2}
7
39
7
["str", "_take", "collected.append", "self._append_to_history", "strip", "join", "self._messages.clear"]
0
[]
The function (_wrap_sync_stream) defined within the protected class called _UniClient, implement an interface, and it inherit another class.The function start at line 489 and ends at 527. It contains 24 lines of code and it has a cyclomatic complexity of 8. It takes 4 parameters, represented as [489.0] and does not ret...
unifyai_unify
public
public
0
0
_wrap_async_stream._internal
async def _internal():async for chunk in stream:if stateful:if return_full_completion:try:delta = chunk.choices[0].delta.contentif delta:collected.append(delta)except Exception:# noqa: BLE001passelse:collected.append(str(chunk))yield chunk# async-generator exhaustedif stateful:if collected:self._append_to_history({"rol...
9
20
0
98
0
541
562
541
null
[]
None
null
0
0
0
null
0
null
The function (_wrap_async_stream._internal) defined within the public class called public.The function start at line 541 and ends at 562. It contains 20 lines of code and it has a cyclomatic complexity of 9. The function does not take any parameters and does not return any value..
unifyai_unify
_UniClient
protected
1
1
_wrap_async_stream
def _wrap_async_stream(# noqa: WPS231self,stream: AsyncGenerator[Any, None],*,stateful: bool,return_full_completion: bool,) -> AsyncGenerator[Any, None]:"""Same as `_wrap_sync_stream` but for *async* generators."""collected: list[str] = []async def _internal():async for chunk in stream:if stateful:if return_full_comple...
1
10
4
49
0
529
564
529
self,stream,stateful,return_full_completion
[]
AsyncGenerator[Any, None]
{"AnnAssign": 1, "Assign": 1, "Expr": 6, "If": 6, "Return": 1, "Try": 1}
8
36
8
["collected.append", "collected.append", "str", "self._append_to_history", "strip", "join", "self._messages.clear", "_internal"]
0
[]
The function (_wrap_async_stream) defined within the protected class called _UniClient, implement an interface, and it inherit another class.The function start at line 529 and ends at 564. It contains 10 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [529.0] and does not re...
unifyai_unify
public
public
0
0
_apply_stateful_logic._await_then_wrap
async def _await_then_wrap(coro):inner = await coro# real result from _generate# inner is expected to be async-gen, but handle sync-gen tooif inspect.isasyncgen(inner):return self._wrap_async_stream(inner,stateful=stateful,return_full_completion=return_full_completion,)if isinstance(inner, (list, tuple)) or inspect.isg...
4
20
1
90
0
587
610
587
null
[]
None
null
0
0
0
null
0
null
The function (_apply_stateful_logic._await_then_wrap) defined within the public class called public.The function start at line 587 and ends at 610. It contains 20 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value..
unifyai_unify
public
public
0
0
_apply_stateful_logic._await_and_process
async def _await_and_process(coro: Coroutine[Any, Any, Any]):try:res = await coroexcept Exception:# nothing was inserted yet, just re-raiseraiseif stateful and placeholder_idx is not None:if return_full_completion:self._messages.insert(placeholder_idx,res.choices[0].message.model_dump(),)else:self._messages.insert(plac...
6
19
1
95
0
637
657
637
null
[]
None
null
0
0
0
null
0
null
The function (_apply_stateful_logic._await_and_process) defined within the public class called public.The function start at line 637 and ends at 657. It contains 19 lines of code and it has a cyclomatic complexity of 6. The function does not take any parameters and does not return any value..
unifyai_unify
_UniClient
protected
1
1
_apply_stateful_logic
def _apply_stateful_logic(# noqa: WPS231,WPS211self,*,response: Any,stateful: bool,was_stream: bool,return_full_completion: bool,) -> Any:"""Ensures the conversation history is updated (or cleared) **once** percall, for all four modalities."""if was_stream:if inspect.iscoroutine(response):async def _await_then_wrap(cor...
9
36
5
174
0
570
671
570
self,response,stateful,was_stream,return_full_completion
[]
Any
{"AnnAssign": 1, "Assign": 4, "Expr": 6, "If": 12, "Return": 9, "Try": 1}
23
102
23
["inspect.iscoroutine", "inspect.isasyncgen", "self._wrap_async_stream", "isinstance", "inspect.isgenerator", "self._wrap_sync_stream", "self._apply_stateful_logic", "_await_then_wrap", "inspect.isasyncgen", "self._wrap_async_stream", "self._wrap_sync_stream", "inspect.iscoroutine", "len", "self._messages.insert", "mes...
0
[]
The function (_apply_stateful_logic) defined within the protected class called _UniClient, implement an interface, and it inherit another class.The function start at line 570 and ends at 671. It contains 36 lines of code and it has a cyclomatic complexity of 9. It takes 5 parameters, represented as [570.0] and does not...
unifyai_unify
_UniClient
protected
1
1
_get_client
def _get_client(self):raise NotImplementedError
1
2
1
7
0
677
678
677
self
[]
None
{}
0
2
0
[]
8
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.behaviour.connection.user.user_steps_py.step_impl", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.providers.amazon.src.airflow.providers.amazon.aws...
The function (_get_client) defined within the protected class called _UniClient, implement an interface, and it inherit another class.The function start at line 677 and ends at 678. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any val...
unifyai_unify
_UniClient
protected
1
1
generate
def generate(self,user_message: Optional[str] = None,system_message: Optional[str] = None,messages: Optional[Union[List[ChatCompletionMessageParam],Dict[str, List[ChatCompletionMessageParam]],]] = None,*,frequency_penalty: Optional[float] = None,logit_bias: Optional[Dict[str, int]] = None,logprobs: Optional[bool] = Non...
10
121
39
969
0
683
963
683
self,user_message,system_message,messages,frequency_penalty,logit_bias,logprobs,top_logprobs,max_completion_tokens,n,presence_penalty,response_format,seed,stop,stream,stream_options,temperature,top_p,tools,tool_choice,parallel_tool_calls,reasoning_effort,use_custom_keys,tags,drop_params,region,log_query_body,log_respon...
[]
Returns
{"Assign": 12, "AugAssign": 3, "Expr": 1, "If": 5, "Return": 1}
43
281
43
["_default", "_default", "_default", "any", "list", "_default", "_default", "_default", "self._generate", "_default", "_default", "_default", "_default", "_default", "_default", "_default", "_default", "_default", "_default", "unify.get_seed", "_default", "_default", "_default", "_default", "_default", "_default", "_de...
45
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3630950_deliveryhero_lymph.lymph.autodoc_py.RPCMethodDocumenter.generate", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3685324_prologin_stechec2.tools.gendiff_py.main", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset...
The function (generate) defined within the protected class called _UniClient, implement an interface, and it inherit another class.The function start at line 683 and ends at 963. It contains 121 lines of code and it has a cyclomatic complexity of 10. It takes 39 parameters, represented as [683.0], and this function ret...
unifyai_unify
_UniClient
protected
1
1
_get_client
def _get_client(self):try:if self._should_use_direct_mode:return openai.OpenAI(api_key=self._openai_api_key,timeout=3600.0,# one hour)http_client = make_httpx_client_for_unify_logging(BASE_URL)return openai.OpenAI(base_url=f"{BASE_URL}",api_key=self._api_key,timeout=3600.0,# one hourhttp_client=http_client,)except open...
3
16
1
76
0
970
985
970
self
[]
None
{}
0
2
0
[]
8
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.behaviour.connection.user.user_steps_py.step_impl", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.providers.amazon.src.airflow.providers.amazon.aws...
The function (_get_client) defined within the protected class called _UniClient, implement an interface, and it inherit another class.The function start at line 970 and ends at 985. It contains 16 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any va...
unifyai_unify
Unify
public
0
1
_generate_stream
def _generate_stream(self,endpoint: str,prompt: Prompt,# streamstream_options: Optional[ChatCompletionStreamOptionsParam],# platform argumentsuse_custom_keys: bool,tags: Optional[List[str]],drop_params: Optional[bool],region: Optional[str],log_query_body: Optional[bool],log_response_body: Optional[bool],# python client...
12
59
11
317
0
987
1,048
987
self,endpoint,prompt,stream_options,use_custom_keys,tags,drop_params,region,log_query_body,log_response_body,return_full_completion
[]
Generator[str, None, None]
{"Assign": 6, "Expr": 7, "For": 1, "If": 7, "Try": 1}
14
62
14
["self._handle_kw", "kw.pop", "kw.pop", "kw.pop", "kw.pop", "print", "threading.get_ident", "unify.traced", "join", "str", "self._client.chat.completions.create", "print", "threading.get_ident", "Exception"]
0
[]
The function (_generate_stream) defined within the public class called Unify, that inherit another class.The function start at line 987 and ends at 1048. It contains 59 lines of code and it has a cyclomatic complexity of 12. It takes 11 parameters, represented as [987.0] and does not return any value. It declares 14.0 ...
unifyai_unify
public
public
0
0
_generate_non_stream._get_cache_traced
def _get_cache_traced(**kw):return _get_cache(fn_name="chat.completions.create",kw=kw,raise_on_empty=cache == "read-only",read_closest=read_closest,delete_closest=read_closest,backend=cache_backend,)
1
9
1
36
0
1,097
1,105
1,097
null
[]
None
null
0
0
0
null
0
null
The function (_generate_non_stream._get_cache_traced) defined within the public class called public.The function start at line 1097 and ends at 1105. It contains 9 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
unifyai_unify
Unify
public
0
1
_generate_non_stream
def _generate_non_stream(self,endpoint: str,prompt: Prompt,# platform argumentsuse_custom_keys: bool,tags: Optional[List[str]],drop_params: Optional[bool],region: Optional[str],log_query_body: Optional[bool],log_response_body: Optional[bool],# python client argumentsreturn_full_completion: bool,cache: Union[bool, str],...
32
148
12
737
0
1,050
1,209
1,050
self,endpoint,prompt,use_custom_keys,tags,drop_params,region,log_query_body,log_response_body,return_full_completion,cache,cache_backend
[]
Union[str, ChatCompletion]
{"Assign": 19, "Expr": 8, "If": 19, "Return": 6, "Try": 1}
41
160
41
["self._handle_kw", "kw.pop", "isinstance", "cache.endswith", "cache.removesuffix", "input", "_get_cache", "unify.traced", "join", "str", "_get_cache", "kw.pop", "kw.pop", "kw.pop", "print", "threading.get_ident", "unify.traced", "join", "str", "chat_method", "print", "threading.get_ident", "Exception", "_write_to_cach...
0
[]
The function (_generate_non_stream) defined within the public class called Unify, that inherit another class.The function start at line 1050 and ends at 1209. It contains 148 lines of code and it has a cyclomatic complexity of 32. It takes 12 parameters, represented as [1050.0] and does not return any value. It declare...
unifyai_unify
Unify
public
0
1
_generate
def _generate(# noqa: WPS234, WPS211self,messages: Optional[List[ChatCompletionMessageParam]],*,frequency_penalty: Optional[float],logit_bias: Optional[Dict[str, int]],logprobs: Optional[bool],top_logprobs: Optional[int],max_completion_tokens: Optional[int],n: Optional[int],presence_penalty: Optional[float],response_fo...
2
85
33
454
0
1,211
1,303
1,211
self,messages,frequency_penalty,logit_bias,logprobs,top_logprobs,max_completion_tokens,n,presence_penalty,response_format,seed,stop,stream,stream_options,temperature,top_p,service_tier,tools,tool_choice,parallel_tool_calls,reasoning_effort,use_custom_keys,tags,drop_params,region,log_query_body,log_response_body,return_...
[]
Union[Generator[str, None, None], str]
{"Assign": 1, "If": 1, "Return": 2}
3
93
3
["Prompt", "self._generate_stream", "self._generate_non_stream"]
8
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3716730_edgewall_genshi.genshi.filters.i18n_py.MsgDirective.__call__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3716730_edgewall_genshi.genshi.filters.tests.test_transform_py._simplify", "_.content.gdrive.MyDri...
The function (_generate) defined within the public class called Unify, that inherit another class.The function start at line 1211 and ends at 1303. It contains 85 lines of code and it has a cyclomatic complexity of 2. It takes 33 parameters, represented as [1211.0] and does not return any value. It declares 3.0 functio...
unifyai_unify
Unify
public
0
1
to_async_client
def to_async_client(self):"""Return an asynchronous version of the client (`AsyncUnify` instance), with theexact same configuration as this synchronous (`Unify`) client.Returns:An `AsyncUnify` instance with the same configuration as this `Unify`instance."""return AsyncUnify(**self._constructor_args)
1
2
1
14
0
1,305
1,314
1,305
self
[]
Returns
{"Expr": 1, "Return": 1}
1
10
1
["AsyncUnify"]
0
[]
The function (to_async_client) defined within the public class called Unify, that inherit another class.The function start at line 1305 and ends at 1314. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declare 1.0 funct...
unifyai_unify
_UniClient
protected
1
1
_get_client
def _get_client(self):try:# Async event hooks must use AsyncClienthttp_client = make_async_httpx_client_for_unify_logging(BASE_URL)if self._should_use_direct_mode:return openai.AsyncOpenAI(api_key=self._openai_api_key,timeout=3600.0,# one hourhttp_client=http_client,)return openai.AsyncOpenAI(base_url=f"{BASE_URL}",api...
3
17
1
80
0
1,321
1,338
1,321
self
[]
None
{}
0
2
0
[]
8
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.behaviour.connection.user.user_steps_py.step_impl", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.providers.amazon.src.airflow.providers.amazon.aws...
The function (_get_client) defined within the protected class called _UniClient, implement an interface, and it inherit another class.The function start at line 1321 and ends at 1338. It contains 17 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any ...
unifyai_unify
Unify
public
0
1
_generate_stream
async def _generate_stream(self,endpoint: str,prompt: Prompt,# streamstream_options: Optional[ChatCompletionStreamOptionsParam],# platform argumentsuse_custom_keys: bool,tags: Optional[List[str]],drop_params: Optional[bool],region: Optional[str],log_query_body: Optional[bool],log_response_body: Optional[bool],# python ...
12
57
11
311
0
1,340
1,400
1,340
self,endpoint,prompt,stream_options,use_custom_keys,tags,drop_params,region,log_query_body,log_response_body,return_full_completion
[]
Generator[str, None, None]
{"Assign": 6, "Expr": 7, "For": 1, "If": 7, "Try": 1}
14
62
14
["self._handle_kw", "kw.pop", "kw.pop", "kw.pop", "kw.pop", "print", "threading.get_ident", "unify.traced", "join", "str", "self._client.chat.completions.create", "print", "threading.get_ident", "Exception"]
0
[]
The function (_generate_stream) defined within the public class called Unify, that inherit another class.The function start at line 1340 and ends at 1400. It contains 57 lines of code and it has a cyclomatic complexity of 12. It takes 11 parameters, represented as [1340.0] and does not return any value. It declares 14....
unifyai_unify
public
public
0
0
_generate_non_stream._get_cache_traced
def _get_cache_traced(**kw):return _get_cache(fn_name="chat.completions.create",kw=kw,raise_on_empty=cache == "read-only",read_closest=read_closest,delete_closest=read_closest,backend=cache_backend,)
1
9
1
36
0
1,448
1,456
1,097
null
[]
None
null
0
0
0
null
0
null
The function (_generate_non_stream._get_cache_traced) defined within the public class called public.The function start at line 1448 and ends at 1456. It contains 9 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
unifyai_unify
Unify
public
0
1
_generate_non_stream
async def _generate_non_stream(self,endpoint: str,prompt: Prompt,# platform argumentsuse_custom_keys: bool,tags: Optional[List[str]],drop_params: Optional[bool],region: Optional[str],log_query_body: Optional[bool],log_response_body: Optional[bool],# python client argumentsreturn_full_completion: bool,cache: Union[bool,...
30
131
12
631
0
1,402
1,544
1,402
self,endpoint,prompt,use_custom_keys,tags,drop_params,region,log_query_body,log_response_body,return_full_completion,cache,cache_backend
[]
Union[str, ChatCompletion]
{"Assign": 19, "Expr": 8, "If": 19, "Return": 6, "Try": 1}
41
160
41
["self._handle_kw", "kw.pop", "isinstance", "cache.endswith", "cache.removesuffix", "input", "_get_cache", "unify.traced", "join", "str", "_get_cache", "kw.pop", "kw.pop", "kw.pop", "print", "threading.get_ident", "unify.traced", "join", "str", "chat_method", "print", "threading.get_ident", "Exception", "_write_to_cach...
0
[]
The function (_generate_non_stream) defined within the public class called Unify, that inherit another class.The function start at line 1402 and ends at 1544. It contains 131 lines of code and it has a cyclomatic complexity of 30. It takes 12 parameters, represented as [1402.0] and does not return any value. It declare...
unifyai_unify
Unify
public
0
1
_generate
async def _generate(# noqa: WPS234, WPS211self,messages: Optional[List[ChatCompletionMessageParam]],*,frequency_penalty: Optional[float],logit_bias: Optional[Dict[str, int]],logprobs: Optional[bool],top_logprobs: Optional[int],max_completion_tokens: Optional[int],n: Optional[int],presence_penalty: Optional[float],respo...
2
85
33
455
0
1,546
1,638
1,546
self,messages,frequency_penalty,logit_bias,logprobs,top_logprobs,max_completion_tokens,n,presence_penalty,response_format,seed,stop,stream,stream_options,temperature,top_p,service_tier,tools,tool_choice,parallel_tool_calls,reasoning_effort,use_custom_keys,tags,drop_params,region,log_query_body,log_response_body,return_...
[]
Union[Generator[str, None, None], str]
{"Assign": 1, "If": 1, "Return": 2}
3
93
3
["Prompt", "self._generate_stream", "self._generate_non_stream"]
8
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3716730_edgewall_genshi.genshi.filters.i18n_py.MsgDirective.__call__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3716730_edgewall_genshi.genshi.filters.tests.test_transform_py._simplify", "_.content.gdrive.MyDri...
The function (_generate) defined within the public class called Unify, that inherit another class.The function start at line 1546 and ends at 1638. It contains 85 lines of code and it has a cyclomatic complexity of 2. It takes 33 parameters, represented as [1546.0] and does not return any value. It declares 3.0 functio...
unifyai_unify
AsyncUnify
public
0
1
to_sync_client
def to_sync_client(self):"""Return a synchronous version of the client (`Unify` instance), with theexact same configuration as this asynchronous (`AsyncUnify`) client.Returns:A `Unify` instance with the same configuration as this `AsyncUnify`instance."""return Unify(**self._constructor_args)
1
2
1
14
0
1,640
1,649
1,640
self
[]
Returns
{"Expr": 1, "Return": 1}
1
10
1
["Unify"]
0
[]
The function (to_sync_client) defined within the public class called AsyncUnify, that inherit another class.The function start at line 1640 and ends at 1649. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declare 1.0 f...
unifyai_unify
AsyncUnify
public
0
1
close
async def close(self):"""Close the underlying client."""await self._client.close()
1
2
1
14
0
1,651
1,655
1,651
self
[]
None
{"Expr": 2}
1
5
1
["self._client.close"]
97
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.behaviour.connection.transaction.transaction_steps_py.step_impl", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3470342_bitprophet_ssh.tests.test_client_py.SSHClientTest.t...
The function (close) defined within the public class called AsyncUnify, that inherit another class.The function start at line 1651 and ends at 1655. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, It h...
unifyai_unify
Prompt
public
0
0
__init__
def __init__(self,**components,):"""Create Prompt instance.Args:components: All components of the prompt.Returns:The Prompt instance."""self.components = components
1
5
2
15
0
2
15
2
self,**components
[]
None
{"Assign": 1, "Expr": 1}
0
14
0
[]
14,667
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.query_py.AllocationError.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.query_py.ContentError.__init__", "_...
The function (__init__) defined within the public class called Prompt.The function start at line 2 and ends at 15. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [2.0] and does not return any value. It has 14667.0 functions calling this function which are ["_....
unifyai_unify
public
public
0
0
get_credits
def get_credits(*, api_key: Optional[str] = None) -> float:"""Returns the credits remaining in the user account, in USD.Args:api_key: If specified, unify API key to be used. Defaults to the value in the`UNIFY_KEY` environment variable.Returns:The credits remaining in USD.Raises:ValueError: If there was an HTTP error.""...
2
6
1
61
2
9
26
9
api_key
['headers', 'response']
float
{"Assign": 2, "Expr": 1, "If": 1, "Return": 1}
5
18
5
["_create_request_header", "http.get", "Exception", "response.json", "_res_to_list"]
0
[]
The function (get_credits) defined within the public class called public.The function start at line 9 and ends at 26. It contains 6 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 5.0 functions, and It has 5.0 functions called ...
unifyai_unify
public
public
0
0
create_custom_api_key
def create_custom_api_key(name: str,value: str,*,api_key: Optional[str] = None,) -> Dict[str, str]:"""Create a custom API key.Args:name: Name of the API key.value: Value of the API key.api_key: If specified, unify API key to be used. Defaultsto the value in the `UNIFY_KEY` environment variable.Returns:A dictionary cont...
2
13
3
90
4
9
37
9
name,value,api_key
['headers', 'url', 'response', 'params']
Dict[str, str]
{"Assign": 4, "Expr": 1, "If": 1, "Return": 1}
5
29
5
["_create_request_header", "http.post", "Exception", "response.json", "response.json"]
0
[]
The function (create_custom_api_key) defined within the public class called public.The function start at line 9 and ends at 37. It contains 13 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [9.0] and does not return any value. It declares 5.0 functions, and It has 5.0 func...
unifyai_unify
public
public
0
0
get_custom_api_key
def get_custom_api_key(name: str,*,api_key: Optional[str] = None,) -> Dict[str, Any]:"""Get the value of a custom API key.Args:name: Name of the API key to get the value for.api_key: If specified, unify API key to be used. Defaultsto the value in the `UNIFY_KEY` environment variable.Returns:A dictionary containing the ...
2
12
2
82
4
40
67
40
name,api_key
['headers', 'url', 'response', 'params']
Dict[str, Any]
{"Assign": 4, "Expr": 1, "If": 1, "Return": 1}
5
28
5
["_create_request_header", "http.get", "Exception", "response.json", "response.json"]
0
[]
The function (get_custom_api_key) defined within the public class called public.The function start at line 40 and ends at 67. It contains 12 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [40.0] and does not return any value. It declares 5.0 functions, and It has 5.0 funct...
unifyai_unify
public
public
0
0
delete_custom_api_key
def delete_custom_api_key(name: str,*,api_key: Optional[str] = None,) -> Dict[str, str]:"""Delete a custom API key.Args:name: Name of the custom API key to delete.api_key: If specified, unify API key to be used. Defaultsto the value in the `UNIFY_KEY` environment variable.Returns:A dictionary containing the response me...
4
16
2
103
4
70
103
70
name,api_key
['headers', 'url', 'response', 'params']
Dict[str, str]
{"Assign": 4, "Expr": 1, "If": 3, "Return": 1}
6
34
6
["_create_request_header", "http.delete", "response.json", "KeyError", "Exception", "response.json"]
0
[]
The function (delete_custom_api_key) defined within the public class called public.The function start at line 70 and ends at 103. It contains 16 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [70.0] and does not return any value. It declares 6.0 functions, and It has 6.0 f...
unifyai_unify
public
public
0
0
rename_custom_api_key
def rename_custom_api_key(name: str,new_name: str,*,api_key: Optional[str] = None,) -> Dict[str, Any]:"""Rename a custom API key.Args:name: Name of the custom API key to be updated.new_name: New name for the custom API key.api_key: If specified, unify API key to be used. Defaults to the value in the `UNIFY_KEY` environ...
2
13
3
90
4
106
137
106
name,new_name,api_key
['headers', 'url', 'response', 'params']
Dict[str, Any]
{"Assign": 4, "Expr": 1, "If": 1, "Return": 1}
5
32
5
["_create_request_header", "http.post", "Exception", "response.json", "response.json"]
0
[]
The function (rename_custom_api_key) defined within the public class called public.The function start at line 106 and ends at 137. It contains 13 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [106.0] and does not return any value. It declares 5.0 functions, and It has 5.0...
unifyai_unify
public
public
0
0
list_custom_api_keys
def list_custom_api_keys(*,api_key: Optional[str] = None,) -> List[Dict[str, str]]:"""Get a list of custom API keys associated with the user's account.Args:api_key: If specified, unify API key to be used. Defaultsto the value in the `UNIFY_KEY` environment variable.Returns:A list of dictionaries containing custom API k...
2
10
1
70
3
140
163
140
api_key
['headers', 'url', 'response']
List[Dict[str, str]]
{"Assign": 3, "Expr": 1, "If": 1, "Return": 1}
5
24
5
["_create_request_header", "http.get", "Exception", "response.json", "response.json"]
0
[]
The function (list_custom_api_keys) defined within the public class called public.The function start at line 140 and ends at 163. It contains 10 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 5.0 functions, and It has 5.0 func...
unifyai_unify
public
public
0
0
create_custom_endpoint
def create_custom_endpoint(*,name: str,url: str,key_name: str,model_name: Optional[str] = None,provider: Optional[str] = None,api_key: Optional[str] = None,) -> Dict[str, Any]:"""Create a custom endpoint for API calls.Args:name: Alias for the custom endpoint. This will be the name used to call the endpoint.url: Base UR...
4
27
6
133
3
12
61
12
name,url,key_name,model_name,provider,api_key
['headers', 'response', 'params']
Dict[str, Any]
{"Assign": 5, "Expr": 1, "If": 3, "Return": 1}
5
50
5
["_create_request_header", "http.post", "Exception", "response.json", "response.json"]
0
[]
The function (create_custom_endpoint) defined within the public class called public.The function start at line 12 and ends at 61. It contains 27 lines of code and it has a cyclomatic complexity of 4. It takes 6 parameters, represented as [12.0] and does not return any value. It declares 5.0 functions, and It has 5.0 f...
unifyai_unify
public
public
0
0
delete_custom_endpoint
def delete_custom_endpoint(name: str,*,api_key: Optional[str] = None,) -> Dict[str, str]:"""Delete a custom endpoint.Args:name: Name of the custom endpoint to delete.api_key: If specified, unify API key to be used. Defaultsto the value in the `UNIFY_KEY` environment variable.Returns:A dictionary containing the response...
2
12
2
82
4
64
92
64
name,api_key
['headers', 'url', 'response', 'params']
Dict[str, str]
{"Assign": 4, "Expr": 1, "If": 1, "Return": 1}
5
29
5
["_create_request_header", "http.delete", "Exception", "response.json", "response.json"]
0
[]
The function (delete_custom_endpoint) defined within the public class called public.The function start at line 64 and ends at 92. It contains 12 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [64.0] and does not return any value. It declares 5.0 functions, and It has 5.0 f...
unifyai_unify
public
public
0
0
rename_custom_endpoint
def rename_custom_endpoint(name: str,new_name: str,*,api_key: Optional[str] = None,) -> Dict[str, Any]:"""Rename a custom endpoint.Args:name: Name of the custom endpoint to be updated.new_name: New name for the custom endpoint.api_key: If specified, unify API key to be used. Defaults to the value in the `UNIFY_KEY` env...
2
13
3
90
4
95
125
95
name,new_name,api_key
['headers', 'url', 'response', 'params']
Dict[str, Any]
{"Assign": 4, "Expr": 1, "If": 1, "Return": 1}
5
31
5
["_create_request_header", "http.post", "Exception", "response.json", "response.json"]
0
[]
The function (rename_custom_endpoint) defined within the public class called public.The function start at line 95 and ends at 125. It contains 13 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [95.0] and does not return any value. It declares 5.0 functions, and It has 5.0 ...
unifyai_unify
public
public
0
0
list_custom_endpoints
def list_custom_endpoints(*,api_key: Optional[str] = None,) -> List[Dict[str, str]]:"""Get a list of custom endpoints for the authenticated user.Args:api_key: If specified, unify API key to be used. Defaultsto the value in the `UNIFY_KEY` environment variable.Returns:A list of dictionaries containing information about ...
2
10
1
70
3
128
153
128
api_key
['headers', 'url', 'response']
List[Dict[str, str]]
{"Assign": 3, "Expr": 1, "If": 1, "Return": 1}
5
26
5
["_create_request_header", "http.get", "Exception", "response.json", "response.json"]
0
[]
The function (list_custom_endpoints) defined within the public class called public.The function start at line 128 and ends at 153. It contains 10 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 5.0 functions, and It has 5.0 fun...
unifyai_unify
public
public
0
0
_unify_requests_debug_enabled
def _unify_requests_debug_enabled() -> bool:return os.getenv("UNIFY_REQUESTS_DEBUG", "false").lower() in ("true", "1")
1
2
0
25
0
9
10
9
[]
bool
{"Return": 1}
2
2
2
["lower", "os.getenv"]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.universal_api.utils.httpx_logging_py.make_async_httpx_client_for_unify_logging", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.universal_api.utils.httpx_logg...
The function (_unify_requests_debug_enabled) defined within the public class called public.The function start at line 9 and ends at 10. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functions, It has 2.0 func...
unifyai_unify
public
public
0
0
make_httpx_client_for_unify_logging._is_unify_chat_request
def _is_unify_chat_request(request: httpx.Request) -> bool:try:if request.url.host != base_host or request.url.scheme != base_scheme:return Falsereturn request.url.path.endswith("/chat/completions")except Exception:return False
4
7
1
48
0
23
29
23
null
[]
None
null
0
0
0
null
0
null
The function (make_httpx_client_for_unify_logging._is_unify_chat_request) defined within the public class called public.The function start at line 23 and ends at 29. It contains 7 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value..
unifyai_unify
public
public
0
0
make_httpx_client_for_unify_logging._pre_request_log
def _pre_request_log(request: httpx.Request) -> None:try:if not _is_unify_chat_request(request):returnmethod = request.method.upper()url_str = str(request.url)headers = dict(request.headers)# normalize Authorization header key for masking in http._logauth_val = headers.get("Authorization", headers.get("authorization"))...
11
36
1
195
0
31
70
31
null
[]
None
null
0
0
0
null
0
null
The function (make_httpx_client_for_unify_logging._pre_request_log) defined within the public class called public.The function start at line 31 and ends at 70. It contains 36 lines of code and it has a cyclomatic complexity of 11. The function does not take any parameters and does not return any value..
unifyai_unify
public
public
0
0
make_httpx_client_for_unify_logging._post_response_log
def _post_response_log(response: httpx.Response) -> None:try:request = response.requestif not _is_unify_chat_request(request):returnmethod = request.method.upper()url_str = str(request.url)is_stream = Falsetry:req_body = Noneif request.content:try:req_body = json.loads((request.content.decode("utf-8")if isinstance(requ...
13
52
1
209
0
72
126
72
null
[]
None
null
0
0
0
null
0
null
The function (make_httpx_client_for_unify_logging._post_response_log) defined within the public class called public.The function start at line 72 and ends at 126. It contains 52 lines of code and it has a cyclomatic complexity of 13. The function does not take any parameters and does not return any value..
unifyai_unify
public
public
0
0
make_httpx_client_for_unify_logging
def make_httpx_client_for_unify_logging(base_url: str) -> Optional[httpx.Client]:if not _unify_requests_debug_enabled():return Nonefrom unify.utils import http as _unify_requestsparsed = urlparse(base_url)base_host = parsed.hostnamebase_scheme = parsed.schemedef _is_unify_chat_request(request: httpx.Request) -> bool:tr...
2
13
1
74
14
13
130
13
base_url
['auth_val', 'request', 'base_host', 'kw', 'base_scheme', 'method', 'headers', 'is_stream', 'body_json', 'payload', 'params', 'url_str', 'req_body', 'parsed']
Optional[httpx.Client]
{"Assign": 25, "Expr": 4, "If": 13, "Return": 9, "Try": 9}
29
118
29
["_unify_requests_debug_enabled", "urlparse", "request.url.path.endswith", "_is_unify_chat_request", "request.method.upper", "str", "dict", "headers.get", "headers.get", "dict", "json.loads", "isinstance", "request.content.decode", "_unify_requests._log", "_is_unify_chat_request", "request.method.upper", "str", "json.l...
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.universal_api.clients.uni_llm_py.Unify._get_client"]
The function (make_httpx_client_for_unify_logging) defined within the public class called public.The function start at line 13 and ends at 130. It contains 13 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 29.0 functions, It ha...
unifyai_unify
public
public
0
0
make_async_httpx_client_for_unify_logging._is_unify_chat_request
def _is_unify_chat_request(request: httpx.Request) -> bool:try:if request.url.host != base_host or request.url.scheme != base_scheme:return Falsereturn request.url.path.endswith("/chat/completions")except Exception:return False
4
7
1
48
0
145
151
145
null
[]
None
null
0
0
0
null
0
null
The function (make_async_httpx_client_for_unify_logging._is_unify_chat_request) defined within the public class called public.The function start at line 145 and ends at 151. It contains 7 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value..
unifyai_unify
public
public
0
0
make_async_httpx_client_for_unify_logging._pre_request_log
async def _pre_request_log(request: httpx.Request) -> None:try:if not _is_unify_chat_request(request):returnmethod = request.method.upper()url_str = str(request.url)headers = dict(request.headers)auth_val = headers.get("Authorization", headers.get("authorization"))if auth_val is not None:headers["Authorization"] = auth...
11
36
1
195
0
153
191
153
null
[]
None
null
0
0
0
null
0
null
The function (make_async_httpx_client_for_unify_logging._pre_request_log) defined within the public class called public.The function start at line 153 and ends at 191. It contains 36 lines of code and it has a cyclomatic complexity of 11. The function does not take any parameters and does not return any value..
unifyai_unify
public
public
0
0
make_async_httpx_client_for_unify_logging._post_response_log
async def _post_response_log(response: httpx.Response) -> None:try:request = response.requestif not _is_unify_chat_request(request):returnmethod = request.method.upper()url_str = str(request.url)is_stream = Falsetry:req_body = Noneif request.content:try:req_body = json.loads((request.content.decode("utf-8")if isinstanc...
13
52
1
210
0
193
247
193
null
[]
None
null
0
0
0
null
0
null
The function (make_async_httpx_client_for_unify_logging._post_response_log) defined within the public class called public.The function start at line 193 and ends at 247. It contains 52 lines of code and it has a cyclomatic complexity of 13. The function does not take any parameters and does not return any value..
unifyai_unify
public
public
0
0
make_async_httpx_client_for_unify_logging
def make_async_httpx_client_for_unify_logging(base_url: str,) -> Optional[httpx.AsyncClient]:if not _unify_requests_debug_enabled():return Nonefrom unify.utils import http as _unify_requestsparsed = urlparse(base_url)base_host = parsed.hostnamebase_scheme = parsed.schemedef _is_unify_chat_request(request: httpx.Request...
2
15
1
77
14
133
251
133
base_url
['auth_val', 'request', 'base_host', 'kw', 'base_scheme', 'method', 'headers', 'is_stream', 'body_json', 'payload', 'params', 'url_str', 'req_body', 'parsed']
Optional[httpx.AsyncClient]
{"Assign": 25, "Expr": 4, "If": 13, "Return": 9, "Try": 9}
29
119
29
["_unify_requests_debug_enabled", "urlparse", "request.url.path.endswith", "_is_unify_chat_request", "request.method.upper", "str", "dict", "headers.get", "headers.get", "dict", "json.loads", "isinstance", "request.content.decode", "_unify_requests._log", "_is_unify_chat_request", "request.method.upper", "str", "json.l...
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.universal_api.clients.uni_llm_py.AsyncUnify._get_client"]
The function (make_async_httpx_client_for_unify_logging) defined within the public class called public.The function start at line 133 and ends at 251. It contains 15 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 29.0 functions...
unifyai_unify
public
public
0
0
get_query_tags
def get_query_tags(*,api_key: Optional[str] = None,) -> List[str]:"""Get a list of available query tags.Args:api_key: If specified, unify API key to be used. Defaultsto the value in the `UNIFY_KEY` environment variable.Returns:A list of available query tags if successful, otherwise an empty list."""headers = _create_re...
2
10
1
65
3
10
30
10
api_key
['headers', 'url', 'response']
List[str]
{"Assign": 3, "Expr": 1, "If": 1, "Return": 1}
5
21
5
["_create_request_header", "http.get", "Exception", "response.json", "response.json"]
0
[]
The function (get_query_tags) defined within the public class called public.The function start at line 10 and ends at 30. It contains 10 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 5.0 functions, and It has 5.0 functions ca...
unifyai_unify
public
public
0
0
get_queries
def get_queries(*,tags: Optional[Union[str, List[str]]] = None,endpoints: Optional[Union[str, List[str]]] = None,start_time: Optional[Union[datetime.datetime, str]] = None,end_time: Optional[Union[datetime.datetime, str]] = None,page_number: Optional[int] = None,failures: Optional[Union[bool, str]] = None,api_key: Opti...
8
29
7
218
4
33
91
33
tags,endpoints,start_time,end_time,page_number,failures,api_key
['headers', 'url', 'response', 'params']
Dict[str, Any]
{"Assign": 10, "Expr": 1, "If": 7, "Return": 1}
5
59
5
["_create_request_header", "http.get", "Exception", "response.json", "response.json"]
0
[]
The function (get_queries) defined within the public class called public.The function start at line 33 and ends at 91. It contains 29 lines of code and it has a cyclomatic complexity of 8. It takes 7 parameters, represented as [33.0] and does not return any value. It declares 5.0 functions, and It has 5.0 functions ca...
unifyai_unify
public
public
0
0
log_query
def log_query(*,endpoint: str,query_body: Dict,response_body: Optional[Dict] = None,tags: Optional[List[str]] = None,timestamp: Optional[Union[datetime.datetime, str]] = None,api_key: Optional[str] = None,consume_credits: bool = False,):"""Log a query (and optionally response) for a locally deployed (non-Unify-register...
4
25
7
165
4
94
143
94
endpoint,query_body,response_body,tags,timestamp,api_key,consume_credits
['headers', 'url', 'data', 'response']
Returns
{"Assign": 5, "Expr": 1, "If": 1, "Return": 1}
6
50
6
["_create_request_header", "data.items", "http.post", "Exception", "response.json", "response.json"]
0
[]
The function (log_query) defined within the public class called public.The function start at line 94 and ends at 143. It contains 25 lines of code and it has a cyclomatic complexity of 4. It takes 7 parameters, represented as [94.0], and this function return a value. It declares 6.0 functions, and It has 6.0 functions...
unifyai_unify
public
public
0
0
get_query_metrics
def get_query_metrics(*,start_time: Optional[Union[datetime.datetime, str]] = None,end_time: Optional[Union[datetime.datetime, str]] = None,models: Optional[str] = None,providers: Optional[str] = None,interval: int = 300,secondary_user_id: Optional[str] = None,api_key: Optional[str] = None,) -> Dict[str, Any]:"""Get qu...
4
25
7
186
4
146
191
146
start_time,end_time,models,providers,interval,secondary_user_id,api_key
['headers', 'url', 'response', 'params']
Dict[str, Any]
{"Assign": 5, "Expr": 1, "If": 1, "Return": 1}
6
46
6
["_create_request_header", "params.items", "http.get", "Exception", "response.json", "response.json"]
0
[]
The function (get_query_metrics) defined within the public class called public.The function start at line 146 and ends at 191. It contains 25 lines of code and it has a cyclomatic complexity of 4. It takes 7 parameters, represented as [146.0] and does not return any value. It declares 6.0 functions, and It has 6.0 fun...
unifyai_unify
public
public
0
0
list_providers
def list_providers(model: Optional[str] = None,*,api_key: Optional[str] = None,) -> List[str]:"""Get a list of available providers, either in total or for a specific model.Args:model: If specified, returns the list of providers supporting this model.api_key: If specified, unify API key to be used. Defaultsto the value ...
3
15
2
101
4
11
40
11
model,api_key
['headers', 'url', 'kw', 'response']
List[str]
{"Assign": 5, "Expr": 1, "If": 2, "Return": 1}
8
30
8
["_create_request_header", "dict", "dict", "http.get", "Exception", "response.json", "_res_to_list", "functools.lru_cache"]
0
[]
The function (list_providers) defined within the public class called public.The function start at line 11 and ends at 40. It contains 15 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [11.0] and does not return any value. It declares 8.0 functions, and It has 8.0 functions...
unifyai_unify
public
public
0
0
list_models
def list_models(provider: Optional[str] = None,*,api_key: Optional[str] = None,) -> List[str]:"""Get a list of available models, either in total or for a specific provider.Args:provider: If specified, returns the list of models supporting this provider.api_key: If specified, unify API key to be used. Defaultsto the val...
3
15
2
101
4
44
72
44
provider,api_key
['headers', 'url', 'kw', 'response']
List[str]
{"Assign": 5, "Expr": 1, "If": 2, "Return": 1}
8
29
8
["_create_request_header", "dict", "dict", "http.get", "Exception", "response.json", "_res_to_list", "functools.lru_cache"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.universal_api.clients.uni_llm_py._UniClient.__init__"]
The function (list_models) defined within the public class called public.The function start at line 44 and ends at 72. It contains 15 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [44.0] and does not return any value. It declares 8.0 functions, It has 8.0 functions called ...
unifyai_unify
public
public
0
0
list_endpoints
def list_endpoints(model: Optional[str] = None,provider: Optional[str] = None,*,api_key: Optional[str] = None,) -> List[str]:"""Get a list of available endpoint, either in total or for a specific model orprovider.Args:model: If specified, returns the list of endpoint supporting this model.provider: If specified, return...
6
23
3
162
4
76
115
76
model,provider,api_key
['headers', 'url', 'kw', 'response']
List[str]
{"Assign": 6, "Expr": 1, "If": 4, "Return": 2}
12
40
12
["_create_request_header", "ValueError", "dict", "_res_to_list", "http.get", "dict", "dict", "http.get", "Exception", "response.json", "_res_to_list", "functools.lru_cache"]
0
[]
The function (list_endpoints) defined within the public class called public.The function start at line 76 and ends at 115. It contains 23 lines of code and it has a cyclomatic complexity of 6. It takes 3 parameters, represented as [76.0] and does not return any value. It declares 12.0 functions, and It has 12.0 functi...
unifyai_unify
public
public
0
0
get_user_basic_info
def get_user_basic_info(*, api_key: Optional[str] = None):"""Get basic information for the authenticated user.Args:api_key: If specified, unify API key to be used. Defaultsto the value in the `UNIFY_KEY` environment variable.Returns:The basic information for the authenticated user."""headers = _create_request_header(ap...
1
4
1
40
2
8
21
8
api_key
['headers', 'response']
Returns
{"Assign": 2, "Expr": 1, "Return": 1}
3
14
3
["_create_request_header", "http.get", "response.json"]
0
[]
The function (get_user_basic_info) defined within the public class called public.The function start at line 8 and ends at 21. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declares 3.0 functions, and It has 3.0 funct...
unifyai_unify
public
public
0
0
set_cache_backend
def set_cache_backend(backend: str) -> None:"""Set the current cache backend."""global CURRENT_CACHE_BACKENDif backend not in CACHE_BACKENDS:raise ValueError(f"Invalid backend: {backend}. Available: {list(CACHE_BACKENDS.keys())}",)CURRENT_CACHE_BACKEND = backend
2
7
1
28
1
32
39
32
backend
['CURRENT_CACHE_BACKEND']
None
{"Assign": 1, "Expr": 1, "If": 1}
3
8
3
["ValueError", "list", "CACHE_BACKENDS.keys"]
0
[]
The function (set_cache_backend) defined within the public class called public.The function start at line 32 and ends at 39. It contains 7 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 3.0 functions, and It has 3.0 functions ...
unifyai_unify
public
public
0
0
get_cache_backend
def get_cache_backend(backend: Optional[str] = None) -> Type[BaseCache]:"""Get the cache backend class."""if backend is None:backend = CURRENT_CACHE_BACKENDif backend not in CACHE_BACKENDS:raise ValueError(f"Invalid backend: {backend}. Available: {list(CACHE_BACKENDS.keys())}",)return CACHE_BACKENDS[backend]
3
8
1
44
1
42
50
42
backend
['backend']
Type[BaseCache]
{"Assign": 1, "Expr": 1, "If": 2, "Return": 1}
3
9
3
["ValueError", "list", "CACHE_BACKENDS.keys"]
3
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3928978_ui_django_post_office.post_office.tests.test_cache_py.CacheTest.test_get_backend_settings", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.utils._caching_py._get_cache", "_.conten...
The function (get_cache_backend) defined within the public class called public.The function start at line 42 and ends at 50. It contains 8 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 3.0 functions, It has 3.0 functions calle...
unifyai_unify
public
public
0
0
set_caching
def set_caching(value: bool) -> bool:"""Enable or disable caching globally."""global CACHING_ENABLEDCACHING_ENABLED = valuereturn CACHING_ENABLED
1
4
1
17
1
53
57
53
value
['CACHING_ENABLED']
bool
{"Assign": 1, "Expr": 1, "Return": 1}
0
5
0
[]
0
[]
The function (set_caching) defined within the public class called public.The function start at line 53 and ends at 57. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
unifyai_unify
public
public
0
0
is_caching_enabled
def is_caching_enabled() -> bool:"""Check if caching is globally enabled."""return CACHING_ENABLED
1
2
0
9
0
60
62
60
[]
bool
{"Expr": 1, "Return": 1}
0
3
0
[]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py._handle_cache", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.universal_api.clients.uni_llm_py._UniClient.generate"]
The function (is_caching_enabled) defined within the public class called public.The function start at line 60 and ends at 62. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It has 2.0 functions calling this function which are...
unifyai_unify
public
public
0
0
_minimal_char_diff
def _minimal_char_diff(a: str, b: str, context: int = 5) -> str:matcher = difflib.SequenceMatcher(None, a, b)diff_parts = []for tag, i1, i2, j1, j2 in matcher.get_opcodes():if tag == "equal":segment = a[i1:i2]# If the segment is too long, show only a context at the beginning and end.if len(segment) > 2 * context:diff_p...
7
17
3
145
3
65
84
65
a,b,context
['diff_parts', 'segment', 'matcher']
str
{"Assign": 3, "Expr": 5, "For": 1, "If": 5, "Return": 1}
9
20
9
["difflib.SequenceMatcher", "matcher.get_opcodes", "len", "diff_parts.append", "diff_parts.append", "diff_parts.append", "diff_parts.append", "diff_parts.append", "join"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.utils._caching_py._get_cache"]
The function (_minimal_char_diff) defined within the public class called public.The function start at line 65 and ends at 84. It contains 17 lines of code and it has a cyclomatic complexity of 7. It takes 3 parameters, represented as [65.0] and does not return any value. It declares 9.0 functions, It has 9.0 functions ...
unifyai_unify
public
public
0
0
_get_cache
def _get_cache(fn_name: str,kw: Dict[str, Any],filename: str = None,raise_on_empty: bool = False,read_closest: bool = False,delete_closest: bool = False,backend: Optional[str] = None,) -> Optional[Any]:global CACHE_LOCK# Prevents circular importfrom unify.logging.logs import Logtype_mapping = {"ChatCompletion": ChatCom...
23
92
7
478
12
88
181
88
fn_name,kw,filename,raise_on_empty,read_closest,delete_closest,backend
['minimal_char_diff', 'current_backend', 'idx_list', 'cache_str', 'typ', 'kw_str', 'kw', 'item', 'type_str', 'type_mapping', 'closest_match', 'keys_to_search']
Optional[Any]
{"Assign": 17, "Expr": 11, "For": 2, "If": 13, "Return": 5, "Try": 1}
41
94
41
["CACHE_LOCK.acquire", "get_cache_backend", "current_backend.initialize_cache", "kw.items", "BaseCache.serialize_object", "current_backend.has_key", "current_backend.list_keys", "len", "CACHE_LOCK.release", "Exception", "BaseCache.serialize_object", "difflib.get_close_matches", "_minimal_char_diff", "CACHE_LOCK.release...
5
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.tests.test_utils.test_map_py.test_map_w_cache", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py._handle_cache", "_.content.gdrive.MyDrive.Phd_T...
The function (_get_cache) defined within the public class called public.The function start at line 88 and ends at 181. It contains 92 lines of code and it has a cyclomatic complexity of 23. It takes 7 parameters, represented as [88.0] and does not return any value. It declares 41.0 functions, It has 41.0 functions call...
unifyai_unify
public
public
0
0
_write_to_cache
def _write_to_cache(fn_name: str,kw: Dict[str, Any],response: Any,backend: Optional[str] = None,filename: str = None,):global CACHE_LOCKCACHE_LOCK.acquire()try:current_backend = get_cache_backend(backend)current_backend.initialize_cache(filename)kw = {k: v for k, v in kw.items() if v is not None}kw_str = BaseCache.seri...
5
29
5
157
6
185
214
185
fn_name,kw,response,backend,filename
['res_types', 'current_backend', 'cache_str', 'kw', 'kw_str', 'response_str']
None
{"Assign": 6, "Expr": 5, "Try": 1}
11
30
11
["CACHE_LOCK.acquire", "get_cache_backend", "current_backend.initialize_cache", "kw.items", "BaseCache.serialize_object", "BaseCache.serialize_object", "current_backend.store_entry", "len", "CACHE_LOCK.release", "CACHE_LOCK.release", "Exception"]
5
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.tests.test_utils.test_map_py.test_map_w_cache", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py._handle_cache", "_.content.gdrive.MyDrive.Phd_T...
The function (_write_to_cache) defined within the public class called public.The function start at line 185 and ends at 214. It contains 29 lines of code and it has a cyclomatic complexity of 5. It takes 5 parameters, represented as [185.0] and does not return any value. It declares 11.0 functions, It has 11.0 function...
unifyai_unify
public
public
0
0
_handle_reading_from_cache
def _handle_reading_from_cache(fn_name: str,kwargs: Dict[str, Any],mode: str,backend: Optional[str] = None,):if isinstance(mode, str) and mode.endswith("-closest"):mode = mode.removesuffix("-closest")read_closest = Trueelse:read_closest = Falsein_cache = Falseret = Noneif mode in [True, "both", "read", "read-only"]:ret...
5
24
4
127
4
217
240
217
fn_name,kwargs,mode,backend
['ret', 'mode', 'read_closest', 'in_cache']
Returns
{"Assign": 7, "If": 2, "Return": 1}
4
24
4
["isinstance", "mode.endswith", "mode.removesuffix", "_get_cache"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.utils._caching_py.cached"]
The function (_handle_reading_from_cache) defined within the public class called public.The function start at line 217 and ends at 240. It contains 24 lines of code and it has a cyclomatic complexity of 5. It takes 4 parameters, represented as [217.0], and this function return a value. It declares 4.0 functions, It has...
unifyai_unify
public
public
0
0
cached.wrapped
def wrapped(*args, **kwargs):sig = inspect.signature(fn)bound = sig.bind_partial(*args, **kwargs)args_kwargs = bound.argumentsret, read_closest, in_cache = _handle_reading_from_cache(fn.__name__,args_kwargs,mode,backend,)if ret is None:ret = fn(*args, **kwargs)if (ret is not None or read_closest) and mode in [True,"bot...
7
25
2
120
0
260
284
260
null
[]
None
null
0
0
0
null
0
null
The function (cached.wrapped) defined within the public class called public.The function start at line 260 and ends at 284. It contains 25 lines of code and it has a cyclomatic complexity of 7. It takes 2 parameters, represented as [260.0] and does not return any value..
unifyai_unify
public
public
0
0
cached.async_wrapped
async def async_wrapped(*args, **kwargs):sig = inspect.signature(fn)bound = sig.bind_partial(*args, **kwargs)args_kwargs = bound.argumentsret, read_closest, in_cache = _handle_reading_from_cache(fn.__name__,args_kwargs,mode,backend,)if ret is None:ret = await fn(*args, **kwargs)if (ret is not None or read_closest) and ...
7
25
2
121
0
286
310
286
null
[]
None
null
0
0
0
null
0
null
The function (cached.async_wrapped) defined within the public class called public.The function start at line 286 and ends at 310. It contains 25 lines of code and it has a cyclomatic complexity of 7. It takes 2 parameters, represented as [286.0] and does not return any value..
unifyai_unify
public
public
0
0
cached
def cached(fn: callable = None,*,mode: Union[bool, str] = True,backend: Optional[str] = None,):if fn is None:return lambda f: cached(f,mode=mode,backend=backend,)def wrapped(*args, **kwargs):sig = inspect.signature(fn)bound = sig.bind_partial(*args, **kwargs)args_kwargs = bound.argumentsret, read_closest, in_cache = _h...
3
15
3
71
4
247
312
247
fn,mode,backend
['sig', 'bound', 'ret', 'args_kwargs']
Returns
{"Assign": 10, "Expr": 2, "If": 7, "Return": 4}
12
66
12
["cached", "inspect.signature", "sig.bind_partial", "_handle_reading_from_cache", "fn", "_write_to_cache", "inspect.signature", "sig.bind_partial", "_handle_reading_from_cache", "fn", "_write_to_cache", "inspect.iscoroutinefunction"]
6
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3957920_mahmoud_boltons.tests.test_cacheutils_py.test_cached_dec", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3957920_mahmoud_boltons.tests.test_cacheutils_py.test_callable_cached_dec", "_.content.gdrive.MyDrive....
The function (cached) defined within the public class called public.The function start at line 247 and ends at 312. It contains 15 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [247.0], and this function return a value. It declares 12.0 functions, It has 12.0 functions cal...
unifyai_unify
public
public
0
0
cache_file_union
def cache_file_union(first_cache_fpath: str,second_cache_fpath: str,target_cache_fpath: str,conflict_mode="raise",):with open(first_cache_fpath, "r") as file:first_cache = json.load(file)with open(second_cache_fpath, "r") as file:second_cache = json.load(file)if conflict_mode == "raise":for key, value in first_cache.it...
6
29
4
156
3
319
347
319
first_cache_fpath,second_cache_fpath,target_cache_fpath,conflict_mode
['second_cache', 'first_cache', 'union_cache']
None
{"Assign": 5, "Expr": 1, "For": 1, "If": 4, "With": 3}
8
29
8
["open", "json.load", "open", "json.load", "first_cache.items", "Exception", "open", "json.dump"]
0
[]
The function (cache_file_union) defined within the public class called public.The function start at line 319 and ends at 347. It contains 29 lines of code and it has a cyclomatic complexity of 6. It takes 4 parameters, represented as [319.0] and does not return any value. It declares 8.0 functions, and It has 8.0 func...
unifyai_unify
public
public
0
0
cache_file_intersection
def cache_file_intersection(first_cache_fpath: str,second_cache_fpath: str,target_cache_fpath: str,conflict_mode="raise",):with open(first_cache_fpath, "r") as file:first_cache = json.load(file)with open(second_cache_fpath, "r") as file:second_cache = json.load(file)if conflict_mode == "raise":for key, value in first_c...
12
29
4
192
3
350
378
350
first_cache_fpath,second_cache_fpath,target_cache_fpath,conflict_mode
['intersection_cache', 'second_cache', 'first_cache']
None
{"Assign": 5, "Expr": 1, "For": 1, "If": 4, "With": 3}
11
29
11
["open", "json.load", "open", "json.load", "first_cache.items", "first_cache.items", "first_cache.items", "second_cache.items", "Exception", "open", "json.dump"]
0
[]
The function (cache_file_intersection) defined within the public class called public.The function start at line 350 and ends at 378. It contains 29 lines of code and it has a cyclomatic complexity of 12. It takes 4 parameters, represented as [350.0] and does not return any value. It declares 11.0 functions, and It has...
unifyai_unify
public
public
0
0
subtract_cache_files
def subtract_cache_files(first_cache_fpath: str,second_cache_fpath: str,target_cache_fpath: str,raise_on_conflict=True,):with open(first_cache_fpath, "r") as file:first_cache = json.load(file)with open(second_cache_fpath, "r") as file:second_cache = json.load(file)if raise_on_conflict:for key, value in first_cache.item...
6
21
4
131
3
381
401
381
first_cache_fpath,second_cache_fpath,target_cache_fpath,raise_on_conflict
['second_cache', 'first_cache', 'final_cache']
None
{"Assign": 3, "Expr": 1, "For": 1, "If": 2, "With": 3}
8
21
8
["open", "json.load", "open", "json.load", "first_cache.items", "first_cache.items", "open", "json.dump"]
0
[]
The function (subtract_cache_files) defined within the public class called public.The function start at line 381 and ends at 401. It contains 21 lines of code and it has a cyclomatic complexity of 6. It takes 4 parameters, represented as [381.0] and does not return any value. It declares 8.0 functions, and It has 8.0 ...
unifyai_unify
public
public
0
0
_res_to_list
def _res_to_list(response: requests.Response) -> Union[List, Dict]:return json.loads(response.text)
1
2
1
25
0
15
16
15
response
[]
Union[List, Dict]
{"Return": 1}
1
2
1
["json.loads"]
4
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.universal_api.utils.credits_py.get_credits", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.universal_api.utils.supported_endpoints_py.list_endpoints", "_.con...
The function (_res_to_list) defined within the public class called public.The function start at line 15 and ends at 16. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, It has 1.0 function called inside...
unifyai_unify
public
public
0
0
_validate_api_key
def _validate_api_key(api_key: Optional[str]) -> str:if api_key is None:api_key = os.environ.get("UNIFY_KEY")if api_key is None:raise KeyError("UNIFY_KEY is missing. Please make sure it is set correctly!",)return api_key
3
8
1
40
1
19
26
19
api_key
['api_key']
str
{"Assign": 1, "If": 2, "Return": 1}
2
8
2
["os.environ.get", "KeyError"]
38
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.dataset_py.Dataset.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.logs_py.Log.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Datas...
The function (_validate_api_key) defined within the public class called public.The function start at line 19 and ends at 26. It contains 8 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 2.0 functions, It has 2.0 functions calle...
unifyai_unify
public
public
0
0
_create_request_header
def _create_request_header(api_key: Optional[str]) -> Dict[str, str]:return {"Authorization": f"Bearer {_validate_api_key(api_key)}","accept": "application/json","Content-Type": "application/json",}
1
6
1
33
0
29
34
29
api_key
[]
Dict[str, str]
{"Return": 1}
1
6
1
["_validate_api_key"]
63
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.assistants.management_py.create_assistant", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.assistants.management_py.delete_assistant", "_.content.gdrive.MyDri...
The function (_create_request_header) defined within the public class called public.The function start at line 29 and ends at 34. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, It has 1.0 function cal...
unifyai_unify
public
public
0
0
_validate_openai_api_key
def _validate_openai_api_key(direct_mode: bool, api_key: Optional[str]) -> str:if not direct_mode:return Noneif api_key is None:api_key = os.environ.get("OPENAI_API_KEY")if api_key is None:warnings.warn("OPENAI_API_KEY is missing when trying to use direct mode. ""Falling back to Unify API.",)return api_key
4
11
2
52
1
37
47
37
direct_mode,api_key
['api_key']
str
{"Assign": 1, "Expr": 1, "If": 3, "Return": 2}
2
11
2
["os.environ.get", "warnings.warn"]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.universal_api.clients.base_py._Client.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.universal_api.clients.multi_llm_py._MultiClient.__init__"]
The function (_validate_openai_api_key) defined within the public class called public.The function start at line 37 and ends at 47. It contains 11 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [37.0] and does not return any value. It declares 2.0 functions, It has 2.0 func...
unifyai_unify
public
public
0
0
_default
def _default(value: Any, default_value: Any) -> Any:return value if value is not None else default_value
2
2
2
22
0
50
51
50
value,default_value
[]
Any
{"Return": 1}
0
2
0
[]
3
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3955608_simplejson_simplejson.simplejson.encoder_py._make_iterencode", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.universal_api.clients.multi_llm_py._MultiClient.generate", "_.content...
The function (_default) defined within the public class called public.The function start at line 50 and ends at 51. It contains 2 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [50.0] and does not return any value. It has 3.0 functions calling this function which are ["_.co...
unifyai_unify
public
public
0
0
_dict_aligns_with_pydantic
def _dict_aligns_with_pydantic(dict_in: Dict, pydantic_cls: type(BaseModel)) -> bool:try:pydantic_cls.model_validate(dict_in)return Trueexcept ValidationError:return False
2
6
2
31
0
54
59
54
dict_in,pydantic_cls
[]
bool
{"Expr": 1, "Return": 2, "Try": 1}
2
6
2
["type", "pydantic_cls.model_validate"]
0
[]
The function (_dict_aligns_with_pydantic) defined within the public class called public.The function start at line 54 and ends at 59. It contains 6 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [54.0] and does not return any value. It declares 2.0 functions, and It has 2....
unifyai_unify
public
public
0
0
_make_json_serializable
def _make_json_serializable(item: Any,) -> Union[Dict, List, Tuple]:# Add a recursion guard using getattr to avoid infinite recursionif hasattr(item, "_being_serialized") and getattr(item, "_being_serialized", False):return "<circular reference>"try:# For objects that might cause recursion, set a flagif hasattr(item, "...
24
45
1
315
1
62
113
62
item
['result']
Union[Dict, List, Tuple]
{"Assign": 11, "Expr": 2, "If": 11, "Return": 2, "Try": 4}
34
52
34
["hasattr", "getattr", "hasattr", "isinstance", "setattr", "isinstance", "_make_json_serializable", "isinstance", "_make_json_serializable", "item.items", "isinstance", "tuple", "_make_json_serializable", "inspect.isclass", "issubclass", "item.model_json_schema", "isinstance", "item.model_dump", "hasattr", "callable", ...
5
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.logs_py.Traced.__enter__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.logs_py.Traced.__exit__", "_.content.gdrive.MyDrive.Phd_Thesis.Datas...
The function (_make_json_serializable) defined within the public class called public.The function start at line 62 and ends at 113. It contains 45 lines of code and it has a cyclomatic complexity of 24. The function does not take any parameters and does not return any value. It declares 34.0 functions, It has 34.0 func...
unifyai_unify
public
public
0
0
_get_and_maybe_create_project
def _get_and_maybe_create_project(project: Optional[str] = None,required: bool = True,api_key: Optional[str] = None,create_if_missing: bool = False,) -> Optional[str]:# noinspection PyUnresolvedReferencesfrom unify.logging.utils.logs import ASYNC_LOGGINGapi_key = _validate_api_key(api_key)if project is None:project = u...
7
23
4
121
2
116
142
116
project,required,api_key,create_if_missing
['api_key', 'project']
Optional[str]
{"Assign": 3, "Expr": 1, "If": 6, "Return": 4, "With": 1}
4
27
4
["_validate_api_key", "unify.active_project", "unify.list_projects", "unify.create_project"]
31
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.contexts_py.add_logs_to_context", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.contexts_py.commit_context", "_.content.gdrive.My...
The function (_get_and_maybe_create_project) defined within the public class called public.The function start at line 116 and ends at 142. It contains 23 lines of code and it has a cyclomatic complexity of 7. It takes 4 parameters, represented as [116.0] and does not return any value. It declares 4.0 functions, It has ...
unifyai_unify
public
public
0
0
_prune_dict.keep
def keep(v):if v in (None, "NOT_GIVEN"):return Falseelse:ret = _prune_dict(v)if isinstance(ret, dict) or isinstance(ret, list) or isinstance(ret, tuple):return bool(ret)return True
5
8
1
53
0
146
153
146
null
[]
None
null
0
0
0
null
0
null
The function (_prune_dict.keep) defined within the public class called public.The function start at line 146 and ends at 153. It contains 8 lines of code and it has a cyclomatic complexity of 5. The function does not take any parameters and does not return any value..
unifyai_unify
public
public
0
0
_prune_dict
def _prune_dict(val):def keep(v):if v in (None, "NOT_GIVEN"):return Falseelse:ret = _prune_dict(v)if isinstance(ret, dict) or isinstance(ret, list) or isinstance(ret, tuple):return bool(ret)return Trueif (not isinstance(val, dict)and not isinstance(val, list)and not isinstance(val, tuple)):return valelif isinstance(val...
12
14
1
121
1
145
166
145
val
['ret']
Returns
{"Assign": 1, "If": 5, "Return": 7}
20
22
20
["_prune_dict", "isinstance", "isinstance", "isinstance", "bool", "isinstance", "isinstance", "isinstance", "isinstance", "_prune_dict", "val.items", "keep", "isinstance", "_prune_dict", "enumerate", "keep", "tuple", "_prune_dict", "enumerate", "keep"]
4
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.task_sdk.src.airflow.sdk.definitions.connection_py.Connection.to_dict", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.task_sdk.src.airflow.sdk.definitions.connection_p...
The function (_prune_dict) defined within the public class called public.The function start at line 145 and ends at 166. It contains 14 lines of code and it has a cyclomatic complexity of 12. The function does not take any parameters, and this function return a value. It declares 20.0 functions, It has 20.0 functions c...
unifyai_unify
public
public
0
0
flexible_deepcopy._attempt
def _attempt(value: Any) -> Union[Any, _SkipType]:"""Try to deepcopy *value*; fall back per on_fail."""try:return flexible_deepcopy(value, on_fail, _memo)except Exception:if on_fail == "raise":raiseif on_fail == "shallow":return valueif on_fail == "skip":return _SKIPraise ValueError(f"Invalid on_fail option: {on_fail!r...
5
11
1
55
0
223
234
223
null
[]
None
null
0
0
0
null
0
null
The function (flexible_deepcopy._attempt) defined within the public class called public.The function start at line 223 and ends at 234. It contains 11 lines of code and it has a cyclomatic complexity of 5. The function does not take any parameters and does not return any value..
unifyai_unify
public
public
0
0
flexible_deepcopy
def flexible_deepcopy(obj: Any,on_fail: str = "raise",_memo: Optional[Dict[int, Any]] = None,) -> Any:"""Perform a deepcopy that tolerates un‑copyable elements.Parameters----------obj : AnyThe object you wish to copy.on_fail : {'raise', 'skip', 'shallow'}, default 'raise'β€’ 'raise' – re‑raise copy error (standard behavi...
19
60
3
331
7
185
290
185
obj,on_fail,_memo
['nv', 'obj_id', 'nitem', 'nk', 'items', 'result', '_memo']
Any
{"AnnAssign": 3, "Assign": 18, "Expr": 5, "For": 4, "If": 16, "Return": 11, "Try": 2}
20
106
20
["id", "flexible_deepcopy", "ValueError", "isinstance", "obj.items", "_attempt", "_attempt", "isinstance", "_attempt", "result.append", "isinstance", "_attempt", "items.append", "tuple", "isinstance", "set", "_attempt", "result.add", "copy.deepcopy", "ValueError"]
3
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py._handle_cache", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.logging.utils.logs_py._handle_mutability", "_.content.gdrive.MyDrive.Phd_...
The function (flexible_deepcopy) defined within the public class called public.The function start at line 185 and ends at 290. It contains 60 lines of code and it has a cyclomatic complexity of 19. It takes 3 parameters, represented as [185.0] and does not return any value. It declares 20.0 functions, It has 20.0 funct...
unifyai_unify
RequestError
public
0
1
__init__
def __init__(self, url: str, r_type: str, response: requests.Response, /, **kwargs):super().__init__(f"{r_type}:{url} with {kwargs} failed with status code {response.status_code}: {response.text}",)self.response = response
1
5
5
39
0
22
26
22
self,url,r_type,response,**kwargs
[]
None
{"Assign": 1, "Expr": 1}
2
5
2
["__init__", "super"]
14,667
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.query_py.AllocationError.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.query_py.ContentError.__init__", "_...
The function (__init__) defined within the public class called RequestError, that inherit another class.The function start at line 22 and ends at 26. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [22.0] and does not return any value. It declares 2.0 functions...
unifyai_unify
public
public
0
0
_log
def _log(type: str, url: str, mask_key: bool = True, /, **kwargs):_kwargs_str = ""if mask_key and "headers" in kwargs:key = kwargs["headers"]["Authorization"]kwargs["headers"]["Authorization"] = "***"for k, v in kwargs.items():if isinstance(v, dict):_kwargs_str += f"{k:}:{json.dumps(v, indent=2)},\n"else:_kwargs_str +=...
7
13
4
105
3
29
49
29
type,url,mask_key,**kwargs
['log_msg', '_kwargs_str', 'key']
None
{"Assign": 5, "AugAssign": 2, "Expr": 1, "For": 1, "If": 3}
4
21
4
["kwargs.items", "isinstance", "json.dumps", "_LOGGER.debug"]
14
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3672733_nose_devs_nose.functional_tests.doc_tests.test_multiprocess.support.test_shared_py.setup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3687139_erotemic_xdoctest.src.xdoctest.runner_py._print_summary_report...
The function (_log) defined within the public class called public.The function start at line 29 and ends at 49. It contains 13 lines of code and it has a cyclomatic complexity of 7. It takes 4 parameters, represented as [29.0] and does not return any value. It declares 4.0 functions, It has 4.0 functions called inside ...
unifyai_unify
public
public
0
0
_mask_auth_key
def _mask_auth_key(kwargs: dict):if "headers" in kwargs:kwargs["headers"]["Authorization"] = "***"return kwargs
2
4
1
23
0
52
55
52
kwargs
[]
Returns
{"Assign": 1, "If": 1, "Return": 1}
0
4
0
[]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.utils.http_py.request"]
The function (_mask_auth_key) defined within the public class called public.The function start at line 52 and ends at 55. It contains 4 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters, and this function return a value. It has 1.0 function calling this function which is [...
unifyai_unify
public
public
0
0
_log_request_if_enabled.inner
def inner(method, url, **kwargs):_log(f"{method}", url, True, **kwargs)res: requests.Response = fn(method, url, **kwargs)try:_log(f"{method} response:{res.status_code}", url, response=res.json())except requests.exceptions.JSONDecodeError:_log(f"{method} response:{res.status_code}", url, response=res.text)return res
2
8
3
76
0
66
73
66
null
[]
None
null
0
0
0
null
0
null
The function (_log_request_if_enabled.inner) defined within the public class called public.The function start at line 66 and ends at 73. It contains 8 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [66.0] and does not return any value..
unifyai_unify
public
public
0
0
_log_request_if_enabled
def _log_request_if_enabled(fn: Callable) -> Callable:"""Only wrap request function if logging is enabled."""if not _LOG_ENABLED:return fn@wraps(fn)def inner(method, url, **kwargs):_log(f"{method}", url, True, **kwargs)res: requests.Response = fn(method, url, **kwargs)try:_log(f"{method} response:{res.status_code}", ur...
2
6
1
25
0
58
75
58
fn
[]
Callable
{"AnnAssign": 1, "Expr": 4, "If": 1, "Return": 3, "Try": 1}
6
18
6
["_log", "fn", "_log", "res.json", "_log", "wraps"]
0
[]
The function (_log_request_if_enabled) defined within the public class called public.The function start at line 58 and ends at 75. It contains 6 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 6.0 functions, and It has 6.0 func...
unifyai_unify
public
public
0
0
request
def request(method, url, **kwargs) -> requests.Response:try:res = _SESSION.request(method, url, **kwargs)res.raise_for_status()return resexcept requests.exceptions.HTTPError as e:kwargs = _mask_auth_key(kwargs)raise RequestError(url, method, e.response, **kwargs)
2
8
3
65
2
79
86
79
method,url,**kwargs
['kwargs', 'res']
requests.Response
{"Assign": 2, "Expr": 1, "Return": 1, "Try": 1}
4
8
4
["_SESSION.request", "res.raise_for_status", "_mask_auth_key", "RequestError"]
29
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3630950_deliveryhero_lymph.lymph.cli.request_py.RequestCommand._run_many_requests", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3630950_deliveryhero_lymph.lymph.cli.request_py.RequestCommand._run_one_request", "_....
The function (request) defined within the public class called public.The function start at line 79 and ends at 86. It contains 8 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [79.0] and does not return any value. It declares 4.0 functions, It has 4.0 functions called insid...
unifyai_unify
public
public
0
0
get
def get(url, params=None, **kwargs):return request("GET", url, params=params, **kwargs)
1
2
3
26
0
89
90
89
url,params,**kwargs
[]
Returns
{"Return": 1}
1
2
1
["request"]
3,001
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.app_py.App.config", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.app_py.PluginsApp.installed_plugins", "_.content.gd...
The function (get) defined within the public class called public.The function start at line 89 and ends at 90. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [89.0], and this function return a value. It declare 1.0 function, It has 1.0 function called inside w...
unifyai_unify
public
public
0
0
options
def options(url, **kwargs):return request("OPTIONS", url, **kwargs)
1
2
2
18
0
93
94
93
url,**kwargs
[]
Returns
{"Return": 1}
1
2
1
["request"]
175
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.endpoint_py.Endpoint.choices", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3703461_scoutapp_scout_apm_python.tests.integration.test_flask_py.test_automatic_options"...
The function (options) defined within the public class called public.The function start at line 93 and ends at 94. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [93.0], and this function return a value. It declare 1.0 function, It has 1.0 function called insi...
unifyai_unify
public
public
0
0
head
def head(url, **kwargs):return request("HEAD", url, **kwargs)
1
2
2
18
0
97
98
97
url,**kwargs
[]
Returns
{"Return": 1}
1
2
1
["request"]
16
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.third_party.cherrypy._cpwsgi_py.CPWSGIApp.__call__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3913804_knio_dominate.tests.test_html_py.test_pretty", "_.content.gdrive.MyDrive.P...
The function (head) defined within the public class called public.The function start at line 97 and ends at 98. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [97.0], and this function return a value. It declare 1.0 function, It has 1.0 function called inside ...
unifyai_unify
public
public
0
0
post
def post(url, data=None, json=None, **kwargs):return request("POST", url, data=data, json=json, **kwargs)
1
2
4
34
0
101
102
101
url,data,json,**kwargs
[]
Returns
{"Return": 1}
1
2
1
["request"]
41
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.api_py.Api.create_token", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.endpoint_py.DetailEndpoint.create", "_.conten...
The function (post) defined within the public class called public.The function start at line 101 and ends at 102. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [101.0], and this function return a value. It declare 1.0 function, It has 1.0 function called insi...
unifyai_unify
public
public
0
0
put
def put(url, data=None, **kwargs):return request("PUT", url, data=data, **kwargs)
1
2
3
26
0
105
106
105
url,data,**kwargs
[]
Returns
{"Return": 1}
1
2
1
["request"]
51
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.behaviour.concept.thing.attribute.attribute_steps_py.step_impl", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.behaviour.concep...
The function (put) defined within the public class called public.The function start at line 105 and ends at 106. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [105.0], and this function return a value. It declare 1.0 function, It has 1.0 function called insid...
unifyai_unify
public
public
0
0
patch
def patch(url, data=None, **kwargs):return request("PATCH", url, data=data, **kwargs)
1
2
3
26
0
109
110
109
url,data,**kwargs
[]
Returns
{"Return": 1}
1
2
1
["request"]
3,062
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.endpoint_py.Endpoint.update", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508200_spiral_project_daybed.daybed.tests.test_id_generators_py.KoremutakeGeneratorTest.t...
The function (patch) defined within the public class called public.The function start at line 109 and ends at 110. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [109.0], and this function return a value. It declare 1.0 function, It has 1.0 function called ins...
unifyai_unify
public
public
0
0
delete
def delete(url, **kwargs):return request("DELETE", url, **kwargs)
1
2
2
18
0
113
114
113
url,**kwargs
[]
Returns
{"Return": 1}
1
2
1
["request"]
303
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.behaviour.concept.thing.thing_steps_py.step_impl", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.behaviour.concept.type.relatio...
The function (delete) defined within the public class called public.The function start at line 113 and ends at 114. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [113.0], and this function return a value. It declare 1.0 function, It has 1.0 function called in...
unifyai_unify
public
public
0
0
set_map_mode
def set_map_mode(mode: str):global MAP_MODEMAP_MODE = mode
1
3
1
12
1
13
15
13
mode
['MAP_MODE']
None
{"Assign": 1}
0
3
0
[]
0
[]
The function (set_map_mode) defined within the public class called public.The function start at line 13 and ends at 15. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
unifyai_unify
public
public
0
0
get_map_mode
def get_map_mode() -> str:return MAP_MODE
1
2
0
8
0
18
19
18
[]
str
{"Return": 1}
0
2
0
[]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.utils.map_py.map"]
The function (get_map_mode) defined within the public class called public.The function start at line 18 and ends at 19. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It has 1.0 function calling this function which is ["_.con...
unifyai_unify
public
public
0
0
_is_iterable
def _is_iterable(item: Any) -> bool:try:iter(item)return Trueexcept TypeError:return False
2
6
1
22
0
22
27
22
item
[]
bool
{"Expr": 1, "Return": 2, "Try": 1}
1
6
1
["iter"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.utils.map_py.map"]
The function (_is_iterable) defined within the public class called public.The function start at line 22 and ends at 27. It contains 6 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declare 1.0 function, It has 1.0 function called inside...
unifyai_unify
public
public
0
0
map.fn_w_exception_handling
def fn_w_exception_handling(*a, **kw):try:return fn(*a, **kw)except Exception as e:if raise_exceptions:raise e
3
6
2
30
0
55
60
55
null
[]
None
null
0
0
0
null
0
null
The function (map.fn_w_exception_handling) defined within the public class called public.The function start at line 55 and ends at 60. It contains 6 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [55.0] and does not return any value..
unifyai_unify
public
public
0
0
map.fn_w_indexing
def fn_w_indexing(rets: List[None], thread_idx: int, *a, **kw):for var, value in kw["context"].items():var.set(value)del kw["context"]ret = fn_w_exception_handling(*a, **kw)pbar.update(1)rets[thread_idx] = ret
2
7
4
67
0
123
129
123
null
[]
None
null
0
0
0
null
0
null
The function (map.fn_w_indexing) defined within the public class called public.The function start at line 123 and ends at 129. It contains 7 lines of code and it has a cyclomatic complexity of 2. It takes 4 parameters, represented as [123.0] and does not return any value..
unifyai_unify
public
public
0
0
map.map._run_asyncio_in_thread.fn_wrapper
async def fn_wrapper(*args, **kwargs):async with semaphore:return await asyncio.to_thread(fn_w_exception_handling, *args, **kwargs)
1
3
2
27
0
153
155
153
null
[]
None
null
0
0
0
null
0
null
The function (map.map._run_asyncio_in_thread.fn_wrapper) defined within the public class called public.The function start at line 153 and ends at 155. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [153.0] and does not return any value..
unifyai_unify
public
public
0
0
map.map._run_asyncio_in_thread.main
async def main(fns):return await tqdm_asyncio.gather(*fns,desc=f"{name}Coroutines",disable=os.environ.get("TQDM_DISABLE", "0") == "1",)
1
6
1
35
0
161
166
161
null
[]
None
null
0
0
0
null
0
null
The function (map.map._run_asyncio_in_thread.main) defined within the public class called public.The function start at line 161 and ends at 166. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
unifyai_unify
public
public
0
0
map._run_asyncio_in_thread
def _run_asyncio_in_thread(ret):asyncio.set_event_loop(asyncio.new_event_loop())MAX_WORKERS = 100semaphore = asyncio.Semaphore(MAX_WORKERS)fns = []async def fn_wrapper(*args, **kwargs):async with semaphore:return await asyncio.to_thread(fn_w_exception_handling, *args, **kwargs)for _, a_n_kw in enumerate(args_n_kwargs):...
2
11
1
75
0
147
168
147
null
[]
None
null
0
0
0
null
0
null
The function (map._run_asyncio_in_thread) defined within the public class called public.The function start at line 147 and ends at 168. It contains 11 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value..
unifyai_unify
public
public
0
0
map
def map(fn: callable,*args,mode=None,name="",from_args=False,raise_exceptions=True,**kwargs,) -> Any:if name:name = (" ".join(substr[0].upper() + substr[1:] for substr in name.split("_")) + " ")if mode is None:mode = get_map_mode()assert mode in ("threading","asyncio","loop",), "map mode must be one of threading, async...
28
97
7
602
13
31
174
31
fn,*args,mode,name,from_args,raise_exceptions,**kwargs
['threads', 'MAX_WORKERS', 'args', 'semaphore', 'fns', 'args_n_kwargs', 'mode', 'ret', 'returns', 'num_calls', 'name', 'pbar', 'thread']
Any
{"Assign": 29, "AugAssign": 1, "Expr": 15, "For": 6, "If": 12, "Return": 6, "Try": 1}
62
144
62
["join", "upper", "name.split", "get_map_mode", "fn", "list", "enumerate", "_is_iterable", "list", "len", "kwargs.values", "isinstance", "len", "Exception", "tuple", "isinstance", "isinstance", "kwargs.items", "range", "isinstance", "isinstance", "isinstance", "len", "isinstance", "len", "tqdm", "os.environ.get", "pbar...
1,501
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.response_py.Record._diff", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16851155_pbui_bobbit.src.bobbit.modules.emojify_py.get_emoji_match", "_.content.gdrive.MyDriv...
The function (map) defined within the public class called public.The function start at line 31 and ends at 174. It contains 97 lines of code and it has a cyclomatic complexity of 28. It takes 7 parameters, represented as [31.0] and does not return any value. It declares 62.0 functions, It has 62.0 functions called insi...
unifyai_unify
BaseCache
public
1
1
serialize_object
def serialize_object(obj: Any,cached_types: Dict[str, str] = None,idx: List[Union[str, int]] = None,indent: int = None,) -> Any:"""Serialize an object to a JSON-serializable format.Args:obj: Object to serializetype_registry: Dictionary to track object types for reconstructionpath: Current path in the object structurein...
15
39
4
297
0
19
71
19
obj,cached_types,idx,indent
[]
Any
{"Assign": 12, "Expr": 1, "If": 9, "Return": 1}
21
53
21
["list", "isinstance", "json.dumps", "obj.model_dump", "inspect.isclass", "issubclass", "obj.schema_json", "isinstance", "json.dumps", "obj.to_json", "isinstance", "BaseCache.serialize_object", "obj.items", "isinstance", "BaseCache.serialize_object", "enumerate", "isinstance", "tuple", "BaseCache.serialize_object", "en...
3
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.utils._caching_py._get_cache", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.utils._caching_py._write_to_cache", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset...
The function (serialize_object) defined within the public class called BaseCache, implement an interface, and it inherit another class.The function start at line 19 and ends at 71. It contains 39 lines of code and it has a cyclomatic complexity of 15. It takes 4 parameters, represented as [19.0] and does not return any...