API Reference¶
The public surface of scrollkit, grouped by submodule. Import exactly what you
need — the top-level scrollkit package is intentionally lightweight (version
metadata only) so importing it costs almost no RAM on CircuitPython.
Auto-generated docs
Install mkdocstrings[python] and add the plugin to mkdocs.yml to render
full signatures and docstrings from source. This page is the curated map.
App¶
from scrollkit.app.base import ScrollKitApp # alias: SLDKApp
ScrollKitApp—__init__(enable_web=True, update_interval=300, enable_watchdog=False, watchdog_timeout=8, enable_auto_reboot=False, max_refresh_failures=None); overridesetup(),update_data(),prepare_display_content(),cleanup(); run withawait app.run();stop(). Hasself.displayandself.content_queue. Render suspension:suspend_render()/resume_render()/with suspended_render(): .../render_suspended— pause queue rendering (queue preserved) while painting an off-queue status frame and blocking on a fetch.enable_auto_rebootopts into rebooting aftermax_refresh_failures(default 12) consecutivenote_refresh_result(ok=False)calls, to recover a wedged radio/session.
Display¶
from scrollkit.display.unified import UnifiedDisplay
from scrollkit.display.interface import DisplayInterface
from scrollkit.display.content import DisplayContent, StaticText, ScrollingText, ContentQueue, Priority
DisplayInterface—width,height,initialize(),clear(),show(),set_pixel(x, y, color),fill(color),set_brightness(v),draw_text(text, x, y, color, font=None)UnifiedDisplay—DisplayInterfacethat auto-selects hardware/simulatorStaticText(text, x, y, color, duration, priority),ScrollingText(text, y, color, speed, priority)—is_complete,elapsed,update(),await render(display)ContentQueue(loop=True)—add(content),get_content_count(),clear(),await get_current(). Plays content in priority order (content.priority, higher first; equal priority plays in insertion order) — not a simple round-robin loop. Withloop=Falsethe queue terminates after the last item'sstop():get_current()returnsNoneuntiladd()re-arms it with new content.Priority—IDLE, LOW, NORMAL, HIGH, URGENT, SYSTEM
Effects¶
from scrollkit.effects.transitions import transition_factory, Transition
from scrollkit.effects.particles import ParticleEngine
from scrollkit.effects.reveal_splash import show_reveal_splash
Web¶
from scrollkit.web.settings_server import SettingsWebServer
Exceptions¶
from scrollkit.exceptions import ScrollKitError, NetworkError, OTAError, FeasibilityError
ScrollKitError— base class for every ScrollKit exception (aliasSLDKError, kept for backward compatibility).NetworkError— raised byHttpClient.get/get_sync/postafter retries are exhausted (or when no HTTP client is available);HttpClient.last_errorkeeps the raw underlying exception.OTAError— raised internally byOTAClienton a server / size / checksum failure; the publicOTAClientmethods catch it and return(ok, reason), so it does not escape their tuple contract.FeasibilityError— raised by the desktop simulator's strict feasibility gate (run_headless(app, strict=True)) when a frame busts the device time or RAM budget. Never raised on hardware.
Only these four are ever raised by the library — there is no aspirational hierarchy of types the library never uses.
OTA¶
from scrollkit.ota.client import OTAClient
from scrollkit.ota.manifest import UpdateManifest
from scrollkit.ota.display_progress import OTAProgressDisplay
OTAClient(update_server_url, current_version, update_dir, backup_dir)—check_for_updates() -> (bool, manifest|str),download_update(manifest),apply_update(). There is no publicrollback()—apply_update()automatically restores the pre-update backup internally if install fails.UpdateManifest—version,files,requirements,compare_version(other),validate(),from_dict(d),to_json()OTAProgressDisplay(client, display=None)— display-progress + staged-install adapter over anOTAClient:attach_display(display),has_pending(),schedule_update(),await install_pending(). Renders centered status frames ("Installing… DO NOT UNPLUG!"); never raises into the OTA flow.
Network / Config / Utils¶
from scrollkit.network.wifi_manager import WiFiManager
from scrollkit.network.http_client import HttpClient
from scrollkit.network import mdns
from scrollkit.config.settings_manager import SettingsManager
from scrollkit.utils.error_handler import ErrorHandler
from scrollkit.utils import diagnostics
from scrollkit.utils.color_utils import ColorUtils
HttpClient—await get(url, headers, max_retries),await post(...), responses expose.json()mdns.advertise(hostname, *, port=80, service_type="_http", protocol="_tcp")— advertise<hostname>.local; returns themdns.Server(RETAIN it — GC stops resolution) orNoneon desktop / no radio; never raises.SettingsManager(filename, defaults, bool_keys)—get,set,save_settings,load_settings,get_scroll_speed,get_pretty_namediagnostics—open() -> Diagnostics(NVM-bound on device, no-op on desktop),read_reset_reason();Diagnostics.record_boot(reason),.safe_mode,note_clean_run(),note_fetch_result(ok, n),record_crash(msg),summary(). NVM-backed boot/crash record + reboot-loop safe-mode breaker.