2026-01-24 22:40:22 +00:00
<!DOCTYPE html>
<!-- retoor <retoor@molodetz.nl> -->
< html lang = "en" >
< head >
< meta charset = "UTF-8" >
< meta name = "viewport" content = "width=device-width, initial-scale=1.0" >
< title > API Reference - Wren-CLI Manual</ title >
< link rel = "stylesheet" href = "../css/style.css" >
</ head >
< body >
< button class = "mobile-menu-toggle" > Menu</ button >
< div class = "container" >
< aside class = "sidebar" >
< div class = "sidebar-header" >
< h1 >< a href = "../index.html" > Wren-CLI</ a ></ h1 >
< div class = "version" > v0.4.0</ div >
</ div >
< nav class = "sidebar-nav" >
< div class = "section" >
< span class = "section-title" > Getting Started</ span >
< ul >
< li >< a href = "../getting-started/index.html" > Overview</ a ></ li >
< li >< a href = "../getting-started/installation.html" > Installation</ a ></ li >
< li >< a href = "../getting-started/first-script.html" > First Script</ a ></ li >
< li >< a href = "../getting-started/repl.html" > Using the REPL</ a ></ li >
</ ul >
</ div >
< div class = "section" >
< span class = "section-title" > Language</ span >
< ul >
< li >< a href = "../language/index.html" > Syntax Overview</ a ></ li >
< li >< a href = "../language/classes.html" > Classes</ a ></ li >
< li >< a href = "../language/methods.html" > Methods</ a ></ li >
< li >< a href = "../language/control-flow.html" > Control Flow</ a ></ li >
< li >< a href = "../language/fibers.html" > Fibers</ a ></ li >
< li >< a href = "../language/modules.html" > Modules</ a ></ li >
</ ul >
</ div >
< div class = "section" >
< span class = "section-title" > API Reference</ span >
< ul >
< li >< a href = "index.html" class = "active" > Overview</ a ></ li >
2026-01-25 03:58:39 +00:00
< li >< a href = "string.html" > String</ a ></ li >
< li >< a href = "number.html" > Num</ a ></ li >
2026-01-24 22:40:22 +00:00
< li >< a href = "http.html" > http</ a ></ li >
< li >< a href = "websocket.html" > websocket</ a ></ li >
< li >< a href = "tls.html" > tls</ a ></ li >
< li >< a href = "net.html" > net</ a ></ li >
< li >< a href = "dns.html" > dns</ a ></ li >
< li >< a href = "json.html" > json</ a ></ li >
< li >< a href = "base64.html" > base64</ a ></ li >
< li >< a href = "regex.html" > regex</ a ></ li >
< li >< a href = "jinja.html" > jinja</ a ></ li >
< li >< a href = "crypto.html" > crypto</ a ></ li >
< li >< a href = "os.html" > os</ a ></ li >
< li >< a href = "env.html" > env</ a ></ li >
< li >< a href = "signal.html" > signal</ a ></ li >
< li >< a href = "subprocess.html" > subprocess</ a ></ li >
< li >< a href = "sqlite.html" > sqlite</ a ></ li >
< li >< a href = "datetime.html" > datetime</ a ></ li >
< li >< a href = "timer.html" > timer</ a ></ li >
< li >< a href = "io.html" > io</ a ></ li >
2026-01-25 03:58:39 +00:00
< li >< a href = "pathlib.html" > pathlib</ a ></ li >
2026-01-24 22:40:22 +00:00
< li >< a href = "scheduler.html" > scheduler</ a ></ li >
< li >< a href = "math.html" > math</ a ></ li >
2026-01-25 01:47:47 +00:00
< li >< a href = "uuid.html" > uuid</ a ></ li >
< li >< a href = "html.html" > html</ a ></ li >
< li >< a href = "argparse.html" > argparse</ a ></ li >
< li >< a href = "wdantic.html" > wdantic</ a ></ li >
< li >< a href = "dataset.html" > dataset</ a ></ li >
< li >< a href = "markdown.html" > markdown</ a ></ li >
< li >< a href = "web.html" > web</ a ></ li >
2026-01-24 22:40:22 +00:00
</ ul >
</ div >
< div class = "section" >
< span class = "section-title" > Tutorials</ span >
< ul >
< li >< a href = "../tutorials/index.html" > Tutorial List</ a ></ li >
< li >< a href = "../tutorials/http-client.html" > HTTP Client</ a ></ li >
< li >< a href = "../tutorials/websocket-chat.html" > WebSocket Chat</ a ></ li >
< li >< a href = "../tutorials/database-app.html" > Database App</ a ></ li >
< li >< a href = "../tutorials/template-rendering.html" > Templates</ a ></ li >
< li >< a href = "../tutorials/cli-tool.html" > CLI Tool</ a ></ li >
</ ul >
</ div >
< div class = "section" >
< span class = "section-title" > How-To Guides</ span >
< ul >
< li >< a href = "../howto/index.html" > How-To List</ a ></ li >
< li >< a href = "../howto/http-requests.html" > HTTP Requests</ a ></ li >
< li >< a href = "../howto/json-parsing.html" > JSON Parsing</ a ></ li >
< li >< a href = "../howto/regex-patterns.html" > Regex Patterns</ a ></ li >
< li >< a href = "../howto/file-operations.html" > File Operations</ a ></ li >
< li >< a href = "../howto/async-operations.html" > Async Operations</ a ></ li >
< li >< a href = "../howto/error-handling.html" > Error Handling</ a ></ li >
</ ul >
</ div >
</ nav >
</ aside >
< main class = "content" >
< nav class = "breadcrumb" >
< a href = "../index.html" > Home</ a >
< span class = "separator" > /</ span >
< span > API Reference</ span >
</ nav >
< article >
< h1 > API Reference</ h1 >
2026-01-25 03:58:39 +00:00
< p > Wren-CLI provides 29 built-in modules covering networking, file I/O, data processing, system operations, and more. All modules are imported using the < code > import</ code > statement.</ p >
2026-01-24 22:40:22 +00:00
< pre >< code > import "http" for Http
import "json" for Json
import "io" for File</ code ></ pre >
2026-01-25 03:58:39 +00:00
< h2 > Core Types</ h2 >
< p > Extended methods on built-in types, available without imports.</ p >
< div class = "card-grid" >
< div class = "card" >
< h3 >< a href = "string.html" > String</ a ></ h3 >
< p > Case conversion, character testing, padding, splitting, reversing, and more on all strings.</ p >
</ div >
< div class = "card" >
< h3 >< a href = "number.html" > Num</ a ></ h3 >
< p > Query predicates, hyperbolic functions, base conversion, formatting, GCD/LCM, and more on all numbers.</ p >
</ div >
</ div >
2026-01-24 22:40:22 +00:00
< h2 > Networking</ h2 >
< p > Modules for HTTP, WebSocket, and low-level network operations.</ p >
< div class = "card-grid" >
< div class = "card" >
< h3 >< a href = "http.html" > http</ a ></ h3 >
< p > HTTP client for making GET, POST, PUT, DELETE, and PATCH requests. Supports HTTPS.</ p >
</ div >
< div class = "card" >
< h3 >< a href = "websocket.html" > websocket</ a ></ h3 >
< p > WebSocket client and server implementation with full protocol support.</ p >
</ div >
< div class = "card" >
< h3 >< a href = "tls.html" > tls</ a ></ h3 >
< p > TLS/SSL socket wrapper for encrypted connections using OpenSSL.</ p >
</ div >
< div class = "card" >
< h3 >< a href = "net.html" > net</ a ></ h3 >
< p > Low-level TCP sockets and servers for custom network protocols.</ p >
</ div >
< div class = "card" >
< h3 >< a href = "dns.html" > dns</ a ></ h3 >
< p > DNS resolution for hostname to IP address lookups.</ p >
</ div >
</ div >
< h2 > Data Processing</ h2 >
< p > Modules for parsing, encoding, and transforming data.</ p >
< div class = "card-grid" >
< div class = "card" >
< h3 >< a href = "json.html" > json</ a ></ h3 >
< p > Parse and stringify JSON data with pretty-printing support.</ p >
</ div >
< div class = "card" >
< h3 >< a href = "base64.html" > base64</ a ></ h3 >
< p > Base64 encoding and decoding for binary-to-text conversion.</ p >
</ div >
< div class = "card" >
< h3 >< a href = "regex.html" > regex</ a ></ h3 >
< p > Regular expression matching, replacement, and splitting.</ p >
</ div >
< div class = "card" >
< h3 >< a href = "jinja.html" > jinja</ a ></ h3 >
< p > Jinja2-compatible template engine with filters, inheritance, and macros.</ p >
</ div >
< div class = "card" >
< h3 >< a href = "crypto.html" > crypto</ a ></ h3 >
< p > Cryptographic hashing (MD5, SHA-1, SHA-256) and random byte generation.</ p >
</ div >
2026-01-25 01:47:47 +00:00
< div class = "card" >
< h3 >< a href = "uuid.html" > uuid</ a ></ h3 >
< p > UUID generation and validation with v4 support.</ p >
</ div >
< div class = "card" >
< h3 >< a href = "html.html" > html</ a ></ h3 >
< p > HTML/URL encoding, decoding, slug generation, and query string handling.</ p >
</ div >
< div class = "card" >
< h3 >< a href = "markdown.html" > markdown</ a ></ h3 >
< p > Convert Markdown text to HTML with safe mode support.</ p >
</ div >
2026-01-24 22:40:22 +00:00
</ div >
< h2 > System</ h2 >
< p > Modules for interacting with the operating system and environment.</ p >
< div class = "card-grid" >
< div class = "card" >
< h3 >< a href = "os.html" > os</ a ></ h3 >
< p > Platform information, process details, and command-line arguments.</ p >
</ div >
< div class = "card" >
< h3 >< a href = "env.html" > env</ a ></ h3 >
< p > Read and write environment variables.</ p >
</ div >
< div class = "card" >
< h3 >< a href = "signal.html" > signal</ a ></ h3 >
< p > Handle Unix signals like SIGINT, SIGTERM, and SIGHUP.</ p >
</ div >
< div class = "card" >
< h3 >< a href = "subprocess.html" > subprocess</ a ></ h3 >
< p > Run external commands and capture their output.</ p >
</ div >
< div class = "card" >
< h3 >< a href = "io.html" > io</ a ></ h3 >
< p > File and directory operations, stdin/stdout handling.</ p >
</ div >
2026-01-25 03:58:39 +00:00
< div class = "card" >
< h3 >< a href = "pathlib.html" > pathlib</ a ></ h3 >
< p > Object-oriented filesystem paths with glob, walk, and tree operations.</ p >
</ div >
2026-01-24 22:40:22 +00:00
</ div >
< h2 > Data & Time</ h2 >
< p > Modules for databases, time, and scheduling.</ p >
< div class = "card-grid" >
< div class = "card" >
< h3 >< a href = "sqlite.html" > sqlite</ a ></ h3 >
< p > SQLite database for persistent data storage with SQL queries.</ p >
</ div >
< div class = "card" >
< h3 >< a href = "datetime.html" > datetime</ a ></ h3 >
< p > Date and time manipulation with formatting and arithmetic.</ p >
</ div >
< div class = "card" >
< h3 >< a href = "timer.html" > timer</ a ></ h3 >
< p > Sleep, timeouts, and interval timers.</ p >
</ div >
< div class = "card" >
< h3 >< a href = "math.html" > math</ a ></ h3 >
< p > Mathematical functions like sqrt, sin, cos, and constants like PI.</ p >
</ div >
< div class = "card" >
< h3 >< a href = "scheduler.html" > scheduler</ a ></ h3 >
< p > Async fiber scheduling for non-blocking I/O operations.</ p >
</ div >
2026-01-25 01:47:47 +00:00
< div class = "card" >
< h3 >< a href = "dataset.html" > dataset</ a ></ h3 >
< p > Simple ORM for SQLite with automatic schema management.</ p >
</ div >
</ div >
< h2 > Application Development</ h2 >
< p > Modules for building web applications and command-line tools.</ p >
< div class = "card-grid" >
< div class = "card" >
< h3 >< a href = "web.html" > web</ a ></ h3 >
< p > Web framework with routing, middleware, sessions, and HTTP client.</ p >
</ div >
< div class = "card" >
< h3 >< a href = "argparse.html" > argparse</ a ></ h3 >
< p > Command-line argument parsing with type conversion and help generation.</ p >
</ div >
< div class = "card" >
< h3 >< a href = "wdantic.html" > wdantic</ a ></ h3 >
< p > Data validation with schema definitions and built-in validators.</ p >
</ div >
2026-01-24 22:40:22 +00:00
</ div >
< h2 > Module Summary</ h2 >
< table >
< tr >
< th > Module</ th >
< th > Main Classes</ th >
< th > Description</ th >
</ tr >
< tr >
< td >< a href = "http.html" > http</ a ></ td >
< td > Http, HttpResponse, Url</ td >
< td > HTTP/HTTPS client</ td >
</ tr >
< tr >
< td >< a href = "websocket.html" > websocket</ a ></ td >
< td > WebSocket, WebSocketServer, WebSocketMessage</ td >
< td > WebSocket protocol</ td >
</ tr >
< tr >
< td >< a href = "tls.html" > tls</ a ></ td >
< td > TlsSocket</ td >
< td > TLS/SSL sockets</ td >
</ tr >
< tr >
< td >< a href = "net.html" > net</ a ></ td >
< td > Socket, Server</ td >
< td > TCP networking</ td >
</ tr >
< tr >
< td >< a href = "dns.html" > dns</ a ></ td >
< td > Dns</ td >
< td > DNS resolution</ td >
</ tr >
< tr >
< td >< a href = "json.html" > json</ a ></ td >
< td > Json</ td >
< td > JSON parsing</ td >
</ tr >
< tr >
< td >< a href = "base64.html" > base64</ a ></ td >
< td > Base64</ td >
< td > Base64 encoding</ td >
</ tr >
< tr >
< td >< a href = "regex.html" > regex</ a ></ td >
< td > Regex, Match</ td >
< td > Regular expressions</ td >
</ tr >
< tr >
< td >< a href = "jinja.html" > jinja</ a ></ td >
< td > Environment, Template, DictLoader, FileSystemLoader</ td >
< td > Template engine</ td >
</ tr >
< tr >
< td >< a href = "crypto.html" > crypto</ a ></ td >
< td > Crypto, Hash</ td >
< td > Cryptography</ td >
</ tr >
< tr >
< td >< a href = "os.html" > os</ a ></ td >
< td > Process, Platform</ td >
< td > OS information</ td >
</ tr >
< tr >
< td >< a href = "env.html" > env</ a ></ td >
< td > Env</ td >
< td > Environment variables</ td >
</ tr >
< tr >
< td >< a href = "signal.html" > signal</ a ></ td >
< td > Signal</ td >
< td > Unix signals</ td >
</ tr >
< tr >
< td >< a href = "subprocess.html" > subprocess</ a ></ td >
< td > Subprocess</ td >
< td > External processes</ td >
</ tr >
< tr >
< td >< a href = "sqlite.html" > sqlite</ a ></ td >
< td > Sqlite</ td >
< td > SQLite database</ td >
</ tr >
< tr >
< td >< a href = "datetime.html" > datetime</ a ></ td >
< td > DateTime, Duration</ td >
< td > Date/time handling</ td >
</ tr >
< tr >
< td >< a href = "timer.html" > timer</ a ></ td >
< td > Timer</ td >
< td > Timers and delays</ td >
</ tr >
< tr >
< td >< a href = "io.html" > io</ a ></ td >
< td > File, Directory, Stdin, Stdout</ td >
< td > File I/O</ td >
</ tr >
2026-01-25 03:58:39 +00:00
< tr >
< td >< a href = "pathlib.html" > pathlib</ a ></ td >
< td > Path, PurePath</ td >
< td > Filesystem paths</ td >
</ tr >
2026-01-24 22:40:22 +00:00
< tr >
< td >< a href = "scheduler.html" > scheduler</ a ></ td >
< td > Scheduler</ td >
< td > Async scheduling</ td >
</ tr >
< tr >
< td >< a href = "math.html" > math</ a ></ td >
< td > Math</ td >
< td > Math functions</ td >
</ tr >
2026-01-25 01:47:47 +00:00
< tr >
< td >< a href = "uuid.html" > uuid</ a ></ td >
< td > Uuid</ td >
< td > UUID generation</ td >
</ tr >
< tr >
< td >< a href = "html.html" > html</ a ></ td >
< td > Html</ td >
< td > HTML/URL encoding</ td >
</ tr >
< tr >
< td >< a href = "argparse.html" > argparse</ a ></ td >
< td > ArgumentParser</ td >
< td > CLI arguments</ td >
</ tr >
< tr >
< td >< a href = "wdantic.html" > wdantic</ a ></ td >
< td > Validator, Field, Schema, ValidationResult</ td >
< td > Data validation</ td >
</ tr >
< tr >
< td >< a href = "dataset.html" > dataset</ a ></ td >
< td > Dataset, Table</ td >
< td > Simple ORM</ td >
</ tr >
< tr >
< td >< a href = "markdown.html" > markdown</ a ></ td >
< td > Markdown</ td >
< td > Markdown to HTML</ td >
</ tr >
< tr >
< td >< a href = "web.html" > web</ a ></ td >
< td > Application, Router, Request, Response, View, Session, Client</ td >
< td > Web framework</ td >
</ tr >
2026-01-24 22:40:22 +00:00
</ table >
</ article >
< footer class = "page-footer" >
< a href = "../language/modules.html" class = "prev" > Modules</ a >
< a href = "http.html" class = "next" > http</ a >
</ footer >
</ main >
</ div >
< script src = "../js/main.js" ></ script >
</ body >
</ html >