qbase is a batteries-included foundation for building kdb+/q applications: a boot
sequence, a dependency loader (require), structured logging, command-line argument
parsing, and a broad set of utility libraries (HTTP, IPC, CSV, cron, timezones,
compression and more).
- kdb+ >= 4.0 (verified on 4.1)
curl -sSL https://raw.githubusercontent.com/belowzeroff/qbase/master/install.sh | bashInstalls to ~/.qbase (override with $QBASE_HOME), or clone the repository and use it
in place. See install.sh for options (offline install via QBASE_SRC,
$QINIT integration).
Start kdb+ with boot.q:
- Linux / macOS:
q ~/.qbase/boot.q(orq $(pwd)/boot.qfrom a checkout) - Windows:
q %CD%\boot.q
This loads the cargs, log and ns core libraries automatically during boot.
Additional libraries can be loaded via the --load-libs command-line argument, or at
runtime with .require.lib.
> rlwrap $QHOME/l64/q $(pwd)/boot.q
...
Application root: /home/me/git/qbase | qbase root: /home/me/git/qbase
Library root location refreshed [ File Count: 36 ]
...
Logging enabled [ Level: INFO ] [ Logger: .log.loggers.basic ] [ Formatter: .log.formatter.default ]
2026.07.20 08:58:26.877 INFO pid-727 me 0 Initialised library: log
q)Core
| Module | Description |
|---|---|
require |
Dependency-aware code loader |
log / log.loggers |
Structured, level-based logging (text + JSON, contextual fields) |
cargs |
Command-line argument parsing |
ns |
Namespace management helpers |
if |
Interface / implementation binding |
type |
Type checking and normalisation |
util |
General utilities |
Data & Time
| Module | Description |
|---|---|
time / time.util |
Time accessors and utilities |
tz |
Timezone conversion (Olson/tz database) |
convert |
Type conversion functions |
csv |
CSV parsing and writing |
rand |
Random data generation |
I/O & Files
| Module | Description |
|---|---|
file / file.hdb / file.kdb |
Filesystem and HDB helpers |
compress |
HDB compression (qIPC, gzip, snappy, lz4hc, ZSTD) |
os |
OS-specific functionality |
so |
Shared-object function manager |
terminal |
Console management |
env |
Environment variables and .env file loading |
parquet |
Apache Parquet read/write via arrowkdb (optional) |
Networking & Integrations
| Module | Description |
|---|---|
ipc |
Inter-process communication |
http / http.status |
HTTP client (TLS, proxy, Basic/Bearer auth) |
jschema |
JSON schema validation for .j.k-parsed data |
wsc |
WebSocket client |
cron |
Job scheduler |
event |
Internal event management |
mail |
E-mail sending via mailx |
slack |
Slack notifications via webhook |
py |
PyKX (Python) integration (optional) |
Module APIs are documented inline with qdoc annotations in each source file.
A documentation site is built with MkDocs (see docs/ and mkdocs.yml):
Getting Started, Core Concepts, Module Guides and API Reference. It is published to GitHub
Pages on each release.
Runnable examples live in examples/:
microservice/— a REST service exposing JSON metricstickerplant-subscriber/— a market-data subscriberpykx-pipeline/— a hybrid q + Python pipeline
See tests/. Run the suite with tests/run.sh (48 tests, green on kdb+ 4.1).
Licensed under the Apache License 2.0. See NOTICE for attribution.
Original work © Sport Trades Ltd and Jaskirat Rajasansir; qbase modifications
© 2026 Evgen Bielozorov.
Based on BuaBook/kdb-common, Apache-2.0.