Documentation

API Reference

Epochly API Reference: Configuration API

Programmatic configuration API for setting enhancement levels, telemetry, and optimization parameters.

Programmatic configuration interface for Epochly.


configure()

Configure Epochly settings programmatically.

Signature

epochly.configure(**kwargs) -> None

Parameters

ParameterTypeDefaultDescription
enhancement_levelint0Enhancement level (0-4)
modestr'balanced'Operating mode: 'off', 'monitor', 'conservative', 'balanced', 'aggressive'
max_workersint8Maximum worker count (1-256)
telemetryboolTrueEnable anonymous telemetry
jit_enabledboolTrueEnable JIT compilation
cache_sizeint512Cache size in MB (0-10240)
log_levelstr'INFO'Log level: DEBUG, INFO, WARNING, ERROR, CRITICAL
auto_optimizeboolTrueEnable automatic optimization
memory_limitint4096Memory limit in MB (100-102400)
profile_enabledboolFalseEnable profiling
gpu_enabledboolTrueEnable GPU acceleration

Note: Defaults shown are CONFIG_SCHEMA defaults applied at initialization. When calling configure(), omitting a parameter leaves its current value unchanged. The log_level CONFIG_SCHEMA default is 'INFO', but the logger initializes with 'WARNING' before any configure() call.

Example

import epochly
epochly.configure(
enhancement_level=3,
mode='balanced',
max_workers=8,
jit_enabled=True,
gpu_enabled=True
)

get_status()

Get current optimization status.

Signature

epochly.get_status() -> dict

Returns

KeyTypeDescription
enabledboolWhether Epochly is enabled
enhancement_levelintCurrent level (0-4)
modestrCurrent mode
jit_availableboolJIT compilation available
worker_countintNumber of workers
gpu_availableboolGPU acceleration available
license_tierstrLicense tier

Example

import epochly
status = epochly.get_status()
print(f"Enhancement level: {status['enhancement_level']}")
print(f"Workers: {status.get('worker_count', 0)}")
print(f"Mode: {status.get('mode', 'balanced')}")

get_config()

Get current configuration.

Signature

epochly.get_config() -> dict

Returns

Dictionary containing all configuration settings.

Example

import epochly
config = epochly.get_config()
print(f"Mode: {config['mode']}")
print(f"Max workers: {config['max_workers']}")

set_level()

Set the enhancement level.

Signature

epochly.set_level(level: int) -> None

Parameters

ParameterTypeDescription
levelintEnhancement level (0-4)

Levels

LevelNameDescription
0MonitorMonitoring only
1ThreadingThread pool optimization
2JITJIT compilation
3MulticoreFull parallelism
4GPUGPU acceleration

Example

import epochly
epochly.set_level(3) # Enable full optimization

get_level()

Get the current enhancement level.

Signature

epochly.get_level() -> int

Returns

Current enhancement level (0-4).

Example

import epochly
level = epochly.get_level()
print(f"Current level: {level}")

is_enabled()

Check if Epochly is enabled.

Signature

epochly.is_enabled() -> bool

Returns

True if Epochly is enabled, False otherwise.

Example

import epochly
if epochly.is_enabled():
print("Epochly is active")
else:
print("Epochly is disabled")

get_metrics()

Get performance metrics.

Signature

epochly.get_metrics() -> dict

Returns

KeyTypeDescription
total_callsintTotal function calls
total_time_msfloatTotal execution time
mean_time_msfloatAverage execution time
memory_peak_mbfloatPeak memory usage
cpu_utilization_percentfloatCPU utilization

Example

import epochly
metrics = epochly.get_metrics()
print(f"Total calls: {metrics.get('total_calls')}")
print(f"Mean time: {metrics.get('mean_time_ms')} ms")

get_license_info()

Get license information.

Signature

epochly.get_license_info() -> dict

Returns

KeyTypeDescription
tierstrLicense tier
validboolLicense validity
featureslistAvailable features
expirationstrExpiration date (if applicable)

Example

import epochly
license_info = epochly.get_license_info()
print(f"Tier: {license_info['tier']}")
print(f"Features: {license_info['features']}")

check_feature()

Check if a feature is available.

Signature

epochly.check_feature(feature: str) -> bool

Parameters

ParameterTypeDescription
featurestrFeature name to check

Available Features

FeatureDescription
'jit_compilation'JIT compilation support
'multicore'Multicore parallelism
'gpu_acceleration'GPU acceleration
'sub_interpreters'Sub-interpreter support
'shared_memory'Shared memory support

Example

import epochly
if epochly.check_feature('gpu_acceleration'):
print("GPU acceleration available")
epochly.set_level(4)
else:
print("Using CPU optimization")
epochly.set_level(3)