Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/BerriAI/litellm
/ with_python
Function
with_python
litellm-rust/crates/python-bridge/src/coercion.rs:269–272 ·
view source on GitHub ↗
(f: impl for<'py> FnOnce(Python<'py>))
Source
from the content-addressed store, hash-verified
267
}
268
269
fn with_python(f: impl for<
'py> FnOnce(Python<'
py>)) {
270
Python::initialize();
271
Python::attach(f);
272
}
273
274
#[rstest]
275
#[case(
"None"
, false, false)]
Callers
9
boolean_operations_have_distinct_python_semantics
Function · 0.85
string_operations_do_not_conflate_absence_and_type_checks
Function · 0.85
string_boolean_tokens_remain_separate_from_truthiness
Function · 0.85
protocol_errors_preserve_exception_identity_traceback_cause_and_context
Function · 0.85
identity_and_string_contents_do_not_invoke_unrelated_protocols
Function · 0.85
attribute_errors_raised_by_a_snapshot_surface_as_raised
Function · 0.85
missing_snapshot_fields_are_runtime_errors_naming_the_field
Function · 0.85
configuration_errors_name_fields_without_exposing_values
Function · 0.85
invalid_collections_and_flags_are_configuration_errors
Function · 0.85
Calls
2
initialize
Function · 0.85
attach
Function · 0.50
Tested by
4
protocol_errors_preserve_exception_identity_traceback_cause_and_context
Function · 0.68
identity_and_string_contents_do_not_invoke_unrelated_protocols
Function · 0.68
missing_snapshot_fields_are_runtime_errors_naming_the_field
Function · 0.68
invalid_collections_and_flags_are_configuration_errors
Function · 0.68