MCPcopy Create free account

hub / github.com/PyO3/pyo3 / functions

Functions4,885 in github.com/PyO3/pyo3

↓ 247 callersMethodas_ptr
Returns the raw pointer to the capsule name.
src/types/capsule.rs:620
↓ 241 callersMethodmap
Consumes the [`PyClassGuard`] and returns a [`PyClassGuardMap`] for a component of the borrowed data # Examples ``` # use pyo3::prelude::*; # use py
src/pyclass/guard.rs:147
↓ 187 callersMethodpy
(&self)
src/impl_/coroutine.rs:32
↓ 176 callersMethoditer
(&self)
src/types/set.rs:204
↓ 125 callersMethodcast
(&self)
src/instance.rs:162
↓ 113 callersMethodto_string
Convert the raw data to a Rust string. For UCS-1 / UTF-8, returns a borrow into the original slice. For UCS-2 and UCS-4, returns an owned string. Re
src/types/string.rs:72
↓ 109 callersMethodcast_into_unchecked
(self)
src/instance.rs:328
↓ 105 callersMethodinto_py_dict
(self, py: Python<'py>)
src/types/dict.rs:811
↓ 102 callersMethodinto_any
(self)
src/instance.rs:879
↓ 101 callersMethodlen
(&self)
src/types/bytes/writer.rs:70
↓ 87 callersMethodbind
(&self, _py: Python<'py>)
src/instance.rs:1746
↓ 84 callersMethodclone
(&self)
src/instance.rs:823
↓ 84 callersMethodinto_pyobject
(self, py: Python<'py>)
src/types/list.rs:1495
↓ 79 callersMethodassume_owned_or_err
(self, py: Python<'_>)
src/ffi_ptr_ext.rs:44
↓ 73 callersMethodeval
Evaluates a Python expression in the given context and returns the result. If `globals` is `None`, it defaults to Python module `__main__`. If `local
src/marker.rs:593
↓ 71 callersMethodpush
(&mut self, obj: &Bound<'_, PyAny>)
pytests/src/objstore.rs:20
↓ 69 callersMethodgetattr
(&self, attr_name: N)
src/types/any.rs:858
↓ 62 callersMethodas_ref
(&self)
src/pycell.rs:279
↓ 53 callersMethodinto_pyobject
(self, py: Python<'py>)
tests/test_getter_setter.rs:331
↓ 49 callersMethodinsert
Inserts an item at the specified index. If `index >= self.len()`, inserts at the end.
src/types/list.rs:392
↓ 48 callersFunctionfetch
()
pyo3-ffi/examples/sequential/tests/test.rs:101
↓ 48 callersMethodis_empty
(&self)
src/types/bytes/writer.rs:64
↓ 46 callersFunctionerror_on_negative
(py: Python<'_>, result: T)
src/err/mod.rs:762
↓ 46 callersFunctionf
()
src/conversions/eyre.rs:141
↓ 46 callersMethodset_item
(&self, key: K, value: V)
src/types/any.rs:1170
↓ 45 callersMethodrun
Executes one or more Python statements in the given context. If `globals` is `None`, it defaults to Python module `__main__`. If `locals` is `None`,
src/marker.rs:636
↓ 44 callersMethodclone
(&self)
src/impl_/pyclass.rs:183
↓ 43 callersMethodto_owned
Creates a new owned [`Bound<T>`] from this borrowed reference by increasing the reference count. # Example ``` use pyo3::{prelude::*, types::PyTuple}
src/instance.rs:985
↓ 41 callersMethodas_borrowed
(&'a self)
src/instance.rs:886
↓ 41 callersMethodimport
Imports the Python module with the specified name. # Examples ```no_run # fn main() { use pyo3::prelude::*; Python::attach(|py| { let module = PyMo
src/types/module.rs:108
↓ 40 callersMethodassume_owned
(self, py: Python<'_>)
src/ffi_ptr_ext.rs:63
↓ 40 callersMethodfinalize
(self)
pyo3-build-config/src/impl_.rs:971
↓ 39 callersFunctionPy_IS_TYPE
(ob: *mut PyObject, tp: *mut PyTypeObject)
pyo3-ffi/src/object.rs:257
↓ 39 callersMethodas_ref
(&self)
src/types/bytes.rs:355
↓ 39 callersMethodrun
( &self, globals: Option<&Bound<'py, PyDict>>, locals: Option<&Bound<'py, PyDict>>,
src/types/code.rs:108
↓ 38 callersMethodcast_into
(self)
src/instance.rs:211
↓ 38 callersFunctionget
Loads the configuration determined from the build environment. This function must be called from a build script, and requires a direct dependency on
pyo3-build-config/src/lib.rs:138
↓ 38 callersMethodinto_pyobject_or_pyerr
(self, py: Python<'py>)
src/conversion.rs:248
↓ 38 callersMethodis_null
(&self)
pyo3-ffi/src/methodobject.rs:189
↓ 35 callersMethodas_any
(&self)
src/instance.rs:870
↓ 35 callersMethodinto_iter
Returns an iterator of values in this set. # Panics If PyO3 detects that the set is mutated during iteration, it will panic.
src/types/set.rs:218
↓ 35 callersMethodtry_into
(self)
src/fmt.rs:172
↓ 35 callersMethodunbind
(self)
src/instance.rs:894
↓ 34 callersMethodgetattr
Retrieves an attribute value. This is equivalent to the Python expression `self.attr_name`. If calling this method becomes performance-critical, the
src/instance.rs:1902
↓ 32 callersMethodNone
(self)
src/marker.rs:668
↓ 32 callersFunctionPy_TYPE
(ob: *mut PyObject)
pyo3-ffi/src/object.rs:211
↓ 32 callersMethodas_bytes
Obtain the raw bytes backing this instance as a [u8] slice.
src/types/string.rs:41
↓ 32 callersMethodas_ptr
(&self)
src/buffer.rs:812
↓ 32 callersMethodcall0
(&self)
src/types/any.rs:1090
↓ 32 callersMethodget_item
(&self, key: K)
src/types/any.rs:1161
↓ 32 callersMethodinto_bound
Connects this guard to the given Python attachment. PyO3 does not currently support using a module from multiple interpreters, so `py` is the attachm
src/types/context.rs:205
↓ 30 callersMethodpy
Returns a `Python` token that is bound to the lifetime of the `PyRef`.
src/pycell.rs:269
↓ 29 callersMethodclone
(&self)
tests/test_compile_error.rs:389
↓ 29 callersMethodinto_pyobject
(self, _py: Python<'py>)
src/fmt.rs:162
↓ 29 callersMethodunbind
Removes the connection to the current Python attachment, allowing the guard to be stored outside it or sent to another thread. Dropping the returned
src/types/context.rs:127
↓ 28 callersMethodinsert
(&mut self, k: S, v: S)
pyo3-build-config/src/impl_.rs:2080
↓ 27 callersMethodcall1
(&self, args: A)
src/types/any.rs:1094
↓ 27 callersMethodextract
Extracts some type from the Python object. This is a wrapper function around [`FromPyObject::extract()`](crate::FromPyObject::extract).
src/instance.rs:1009
↓ 27 callersMethodinsert
Inserts a value into the list. Returns `Some(val)` if the `PyObjectFreeList` is full.
src/impl_/freelist.rs:73
↓ 27 callersMethodvalue
Returns the value of this exception. # Examples ```rust use pyo3::{exceptions::PyTypeError, PyErr, Python}; Python::attach(|py| { let err: PyErr =
src/err/mod.rs:233
↓ 26 callersMethodas_ptr
(&self)
pyo3-ffi/src/methodobject.rs:184
↓ 26 callersMethodget
(&self, _py: Python<'_>)
src/sync.rs:91
↓ 25 callersMethodpush
(mut self, slot: c_int, value: *mut c_void)
src/impl_/pymodule.rs:434
↓ 25 callersMethodpush_str
(&mut self, value: &str)
pyo3-macros-backend/src/introspection.rs:558
↓ 25 callersMethodraw
(&self)
src/buffer.rs:751
↓ 23 callersMethodadd_subclass
(self, subclass_value: S)
src/pyclass_init.rs:126
↓ 23 callersMethodappend
Appends an item to the list.
src/types/list.rs:378
↓ 23 callersMethodborrow_mut
(&self)
src/instance.rs:587
↓ 23 callersMethodcast_unchecked
(&self)
src/instance.rs:317
↓ 23 callersMethodis_none
Returns whether the object is considered to be None. This is equivalent to the Python expression `self is None`.
src/instance.rs:1858
↓ 22 callersFunctionPyDateTimeAPI
()
pyo3-ffi/src/datetime.rs:606
↓ 21 callersMethodas_mapping
(&self)
src/types/mappingproxy.rs:117
↓ 21 callersMethodlock
Acquire the mutex, blocking the current thread until it is able to do so.
src/sync/mutex.rs:166
↓ 21 callersMethodnext
Advances the iterator and returns the next value.
src/types/set.rs:250
↓ 20 callersFunctionPyObject_TypeCheck
(ob: *mut PyObject, tp: *mut PyTypeObject)
pyo3-ffi/src/object.rs:416
↓ 20 callersMethodborrow
(obj: &Bound<'py, T>)
src/pycell.rs:310
↓ 20 callersMethoddetach
Temporarily releases the GIL, thus allowing other Python threads to run. The GIL will be reacquired when `F`'s scope ends. If you don't need to touch
src/marker.rs:562
↓ 20 callersMethodis_none
(&self)
src/types/any.rs:1153
↓ 19 callersMethodinto_pyobject
(self, py: Python<'py>)
src/conversions/jiff.rs:107
↓ 19 callersMethodtake
Takes the current error from the Python interpreter's global state and clears the global state. If no error is set, returns `None`. If the error is a
src/err/mod.rs:287
↓ 18 callersFunction_run_cargo
( session: nox.Session, *args: str, expect_error: bool = False, **kwargs: Any )
noxfile.py:1979
↓ 18 callersMethodget
(&self, bit_offset: usize, bit_width: u8)
pyo3-ffi/src/cpython/unicodeobject.rs:76
↓ 18 callersMethodinstall
(py: Python<'_>)
tests/test_utils/mod.rs:203
↓ 18 callersMethodlib_name
The name of the link library defining Python. This effectively controls the `cargo:rustc-link-lib=<name>` value to control how libpython is linked. V
pyo3-build-config/src/impl_.rs:321
↓ 18 callersMethodparse
Transforms a rust fn arg parsed with syn into a method::FnArg
pyo3-macros-backend/src/method.rs:153
↓ 17 callersFunction_run
Wrapper for _run(session, which creates nice groups on GitHub Actions.
noxfile.py:1957
↓ 17 callersMethodcall
Calls the object. This is equivalent to the Python expression `self(*args, **kwargs)`.
src/instance.rs:1942
↓ 17 callersMethodextract
(ob: Borrowed<'_, 'py, PyAny>)
src/conversions/jiff.rs:131
↓ 17 callersFunctionnew_py_datetime_ob
(py: Python<'py>, name: &str, args: A)
src/conversions/chrono.rs:1224
↓ 17 callersMethodrestore
(self, py: Python<'_>)
src/err/mod.rs:451
↓ 17 callersFunctionsleep
(seconds: f64)
tests/test_coroutine.rs:115
↓ 17 callersMethodspan
(&self)
pyo3-macros-backend/src/derive_attributes.rs:106
↓ 17 callersMethodstable_abi
(self, kind: StableAbi)
pyo3-build-config/src/impl_.rs:932
↓ 16 callersFunctionPy_None
()
pyo3-ffi/src/object.rs:662
↓ 16 callersFunction_get_attr
(obj: *mut PyObject, field: &core::ffi::CStr)
pyo3-ffi/src/datetime.rs:353
↓ 16 callersMethodadd
Adds an element to the set.
src/types/frozenset.rs:36
↓ 16 callersMethodas_type_ptr
(&self)
src/types/typeobject.rs:116
↓ 16 callersMethodcall_method0
(&self, name: N)
src/types/any.rs:1121
↓ 16 callersMethodinto_pyobject
(self, py: Python<'py>)
src/conversions/std/num.rs:197
↓ 15 callersMethodas_mut_ptr
(&mut self)
src/types/bytes/writer.rs:81
next →1–100 of 4,885, ranked by callers