API Reference¶
This page provides auto-generated API documentation from docstrings and type stubs for modules without dedicated guide pages. For detailed usage, see the module-specific pages.
Note
For usage examples and conceptual guides, see:
Allocator Protocol — Allocator protocol and config contexts
Heap Allocator — In-process heap allocator
Shared-Memory Allocator — Shared-memory page allocator
ByteMap — Fast hash maps
Intern String — String interning
Environment Config Context — EnvConfigContext base class
Backports — Python C API backports (128-bit int, dict)
C API Reference — C-level API for extension developers
Backports¶
- cbase.backports.pylong.pylong_as_int128(val) bytes
- cbase.backports.pylong.pylong_as_uint128(val) bytes
- cbase.backports.pylong.pylong_from_int128(bytes buf)
- cbase.backports.pylong.pylong_from_uint128(bytes buf)
Top-Level Package¶
Environment Config¶
- class cbase.env.EnvConfigContext(dict overrides=None, **kwargs)
Bases:
object- __enter__(self)
- Return type:
- __exit__(self, exc_type, exc_val, exc_tb)
- Parameters:
exc_type (
type[BaseException] |None)- Return type:
- __init__(*args, **kwargs)
- cbase.env.__reduce_cython__(self)
- cbase.env.__setstate_cython__(self, __pyx_state)
Type Stubs¶
The package includes complete type stubs (.pyi files) for all Cython
modules:
cbase/env.pyicbase/allocator_protocol/c_allocator_protocol.pyicbase/allocator_protocol/c_heap_allocator.pyicbase/allocator_protocol/c_shm_allocator.pyicbase/intern_string/c_intern_string.pyi
These provide full type information for IDEs and type checkers like mypy or pyright.