scikitplot.cython#
scikitplot.cython#
A lightweight runtime Cython development kit with caching, pinning, garbage collection, and templating support.
scikitplot.cython enables real-time, in-place (in-situ) generation of
low-level Cython packages and modules for immediate use and testing.
User guide. See the PKG/MOD Realtime-Inplace Generation section for further details.
PKG/MOD Builder#
Compile and import an extension module (module-only convenience wrapper). |
|
Compile and import an extension module, with deterministic caching. |
|
Compile a package of multiple extension modules from in-memory code strings. |
|
Compile a package of multiple extension modules from existing |
Cache Management#
A compiled module cache entry. |
|
A compiled package cache entry (multi-module build). |
|
Find module cache entries matching an exact module name. |
|
Find a single module cache entry by key. |
|
Find a single package cache entry by key. |
|
Return True if |
|
Return all cache entry directories whose name is a valid cache key. |
|
List module cache entries found under the cache directory. |
|
List package cache entries found under the cache directory. |
|
Create a deterministic cache key from a JSON-serializable mapping. |
|
Resolve the cache directory path without creating it. |
|
Read |
|
Register an existing compiled extension artifact into the cache registry. |
|
Resolve and create the cache directory. |
|
Compute a runtime fingerprint for caching correctness. |
|
SHA-256 digest of source bytes. |
|
Write |
Custom Compiler Protocol#
Structural protocol for custom compiler callables. |
|
Thread-unsafe module-level registry of custom compiler callables. |
|
Register a custom compiler in the module-level registry. |
|
Retrieve a registered custom compiler by name. |
|
Return sorted list of registered custom compiler names. |
|
Check prerequisites pure Python, setuptools only. |
|
Check prerequisites compile C++ via Cython. |
|
Check prerequisites full stack setuptools, Cython, pybind11, and NumPy. |
|
Check prerequisites pybind11 only. |
|
Check prerequisites own custom C-API. |
|
Return the pybind11 include directory, or |
|
Return the NumPy C-API include directory, or |
|
Collect C/C++ source files from one or more files, directories, or globs. |
|
Collect unique directories that contain C/C++ header files. |
|
Built-in custom compiler: pybind11-only projects. |
|
Built-in custom compiler: NumPy C-API projects. |
Cache Management Utilities#
Compute cache statistics. |
|
Deterministically garbage-collect cached build entries. |
Extension Module Loader#
Import an extension module from an explicit artifact path. |
|
Import an extension module from raw artifact bytes. |
|
Import an extension module from a filesystem path. |
Cross-platform Build Lock#
Acquire an exclusive build lock via atomic directory creation. |
Pins/Aliases Registry#
List the current alias→key mappings. |
|
Pin a cache key under a human-friendly alias. |
|
Resolve an alias to a cache key. |
|
Remove an alias pin. |
Build Profile Presets#
Normalized defaults produced by applying a profile. |
|
Apply a profile with strict precedence rules. |
|
Return True if running on Windows. |
|
Resolve a profile name to deterministic defaults. |
Public API#
Build and import a multi-module extension package and return loaded modules. |
|
Build and import a multi-module extension package from code strings. |
|
Build and import a multi-module extension package and return loaded modules. |
|
Build and import a multi-module extension package from |
|
Check whether build prerequisites are importable. |
|
Compile and import a Cython extension module and return the loaded module. |
|
Compile and import a Cython extension module from source text. |
|
Compile/import a Cython module from a |
|
Compile and import all |
|
Compile/import a Cython module from a |
|
Export a cache entry directory to a destination folder. |
|
Resolve (and create) the cache root directory. |
|
Import a compiled extension artifact from raw bytes. |
|
Import a compiled extension artifact from a path. |
|
Import a cached module entry and return the loaded module. |
|
Import the newest cached module entry matching |
|
Import a cached package and return the loaded modules. |
|
Import a cached package entry by cache key. |
|
Import a cached module entry by cache key. |
|
Import a pinned alias and return the loaded module(s). |
|
Import a pinned alias. |
|
List cached module entries. |
|
List cached package entries. |
|
Delete the entire cache directory. |
|
Register a compiled extension artifact from bytes and import it. |
|
Register an existing compiled extension artifact on disk, then import it. |
Result types#
Result of compiling/importing a single Cython extension module. |
|
Result of a cache garbage-collection operation. |
|
Cache statistics for the compiled-artifact cache root. |
|
Result of compiling/importing a package of extension modules. |
Security Guards#
Immutable security policy applied to build inputs before compilation. |
|
Immutable security policy applied to build inputs before compilation. |
|
Raised when a build input violates the active |
|
Immutable security policy applied to build inputs before compilation. |
|
Return |
|
Return |
|
Return |
|
Validate build inputs against a |
Template and workflow assets#
Structured metadata for a template. |
|
Build and import a multi-module package example and return loaded modules. |
|
Build and import a multi-module package example and return a structured result. |
|
Compile and import a Cython template and return the loaded module. |
|
Compile and import a Cython template and return a structured result. |
|
Copy a workflow template folder to a destination directory. |
|
Generate Sphinx |
|
Resolve a package example name to its on-disk folder path. |
|
Resolve a template ID to an on-disk path. |
|
Resolve a workflow name to its on-disk folder path. |
|
List available multi-module package examples. |
|
List available templates. |
|
List available workflow template folders. |
|
Load package example metadata from |
|
Load template metadata from an adjacent |
|
Read template source text. |
|
Read metadata for a template and return a |
|
Return the on-disk template root directory. |
|
Return the workflow CLI template path. |
Small utilities#
Convert an arbitrary string into a valid Python module name. |