Python API

The Python modules, documented from their docstrings. Most programs need none of them: writing .ki files takes the language, and importing one from Python takes import koskari. They matter when Koskari is embedded in a Python application, extended with a Python-side special form or layout handler, or driven by tooling.

Embedding and running

Module

Holds

koskari

The package: importing it installs the .ki import hook

koskari.module

Creating a module, attaching a file, loading it on the demand or async path

koskari.importer

The meta-path finder and loaders for .ki and .kio

koskari.cli

The koskari command, the REPL, and the async entry points

koskari.asyncio

Bridging Koskari callables and asyncio tasks

koskari.exceptions

The exception classes for the read, compile, and run stages

The language

Module

Holds

koskari.builtins

Every name bound in a fresh module, partitioned into runtime, compile-time, and reader sections

koskari.lib

The native extension: symbols, pairs, refs, namespaces, functions, the evaluator

koskari.types

Type predicates and helpers

koskari.reader

The s-expression and layout readers

koskari.reader.layouts

The layout handlers

koskari.compile

The compiler

koskari.compile.specials

The special forms, by family

koskari.syntax

Syntax transformers: rules, match, and bare forms

koskari.hygiene

Template expansion, marking, and finalize for macro expansion

koskari.matcher

The pattern matcher behind specials, macros, and match

koskari.serialize

The codex format for .kio files

koskari.dis

The bytecode disassembler

koskari.help

The help system

Tooling

Module

Holds

koskari.lexer

The token stream used by the REPL and the language server

koskari.lexer.prompt_toolkit

The highlighted REPL input

koskari.extras.pygments

The Pygments lexer

koskari.extras.sphinx

The Sphinx extension: autodoc for Koskari objects, the builtins directive, the dialogue and pair rows

koskari.extras.lsp

The language server