API Reference
Epochly API Reference: Core API
Core Epochly API functions for optimization, statistics retrieval, and runtime control.
Complete API reference for Epochly's core functionality.
epochly.optimize
The primary decorator for optimization.
epochly.optimize(level: Union[int, EnhancementLevel] = None,monitor_performance: bool = True,**options) -> Callable
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| level | int or EnhancementLevel | None | Enhancement level (0-4) |
| monitor_performance | bool | True | Collect metrics |
Returns
Decorated function with Epochly optimization.
Example
@epochly.optimize(level=2)def my_function(data):return [x * 2 for x in data]
epochly.optimize_context
Context manager for block-level optimization.
epochly.optimize_context(level: Union[int, EnhancementLevel] = 1,monitor_performance: bool = True,**options) -> ContextManager
Example
with epochly.optimize_context(level=3):result = heavy_computation()
epochly.configure
Configure Epochly settings.
epochly.configure(enhancement_level: Union[int, str, EnhancementLevel] = 0,force: bool = False,**kwargs) -> None
All CONFIG_SCHEMA keys are accepted via **kwargs (see configure() reference above).
epochly.get_status
Get current Epochly status.
epochly.get_status() -> dict
Returns
{"enhancement_level": "Level 2 (JIT)","workers": 4,"tier": "community","active": True}