Koskript
Koskript is a simple, embeddable, and lightweight scripting language for Python applications. It features dynamic typing, lexical scoping, closures, classes and native Python interop — letting you expose any Python function or object directly to your scripts.
from koskript import KoskriptRuntime
runtime = KoskriptRuntime()
runtime.execute("""
const names = ["Ana", "Luis"]
array.each(names, (name) { print("hello " + name) })
""")
NOTE: Koskript is in early development. Module imports, error handling and performance improvements are on the way; expect the language and API to change between releases.
Features
- Dynamic typing.
- Block-level lexical scoping with
localdeclarations. - Closures that capture their defining scope, including
thisinside methods. - Constants with
const. - Classes with inheritance, visibility, static methods and constructors.
- Standard library: core builtins plus
map,array,string,mathandjson. - Native Python interop for functions, objects and classes.
if,elseif,else.while,for,foreachloops withbreak/continue.- Member access and index access.
- First-class functions and lambda expressions.
- Arithmetic, comparison and logical operators.
- Embeddable in any Python application.
Installation
pip install -U koskript
Or clone the repository and import it directly:
git clone https://github.com/alesis-buzz/koskript.git
Koskript requires Python 3.10+ and Lark.
Documentation
| Document | What it covers |
|---|---|
| Getting started | Installation, first script, a complete example |
| Language reference | Types, variables, operators, control flow, functions, closures, loops, strings |
| Classes | Inheritance, visibility, static members, constructors, super |
| Standard library | Core builtins and the map, array, string, math and json namespaces |
| Python interop | Exposing Python values, callables and classes to scripts |
| Embedding guide | KoskriptRuntime, run(), error handling and stdlib activation |
| Roadmap | What is done, what is planned, known limitations |
License
Koskript is licensed under the Mozilla Public License 2.0 (MPL-2.0). See LICENSE for the full text.
You are free to use, modify, and redistribute Koskript. However, you may not redistribute this project under a different name or claim authorship of the Koskript language.
Koskript is a trademark of Alesis.
Built with ❤️ by Alesis
Metadata
Release files for koskript 1.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| koskript-1.4.0.tar.gz | 37.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| koskript-1.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 72.0 kB
Release files / koskript-1.4.0.tar.gz
| Download URL | koskript-1.4.0.tar.gz |
|---|---|
| Size | 37.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3a17e5599f8a9ce380de3c236938191d2094ffb9202465557d1dd8eca559eb75
|
|
BLAKE2b-256 checksum How to use checksums |
f6956a0a81ebfa85cbbfc11ea497c551e01e4dedd3aecc783ec3939bf789d96f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|
Release files / koskript-1.4.0-py3-none-any.whl
| Download URL | koskript-1.4.0-py3-none-any.whl |
|---|---|
| Size | 34.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0030ef6cbc85f2441ada76e81133c92af4d850d556b3d5cdc9ef483bfbe799f5
|
|
BLAKE2b-256 checksum How to use checksums |
d54fd4f8ffd2e439bd64eec8038a28547e8adc70723a42e602c223d0bba26c6f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|