GemDBWrite Python. Run it inside the database. Install from either marketplace:
GemDB is a VS Code extension that installs a database which executes Python natively — not Python that talks to a database over a connection, but Python whose objects are the database's objects. Assign to a variable, commit, and it is still there tomorrow.
Getting startedInstall the extension. There is no second step. On first activation GemDB downloads the database engine (about 210 MB), unpacks
it, and creates one database under While that downloads, it asks for your password once, to raise the machine's
shared-memory limit. That is the only prompt, and the only change GemDB makes
outside Then open the GemDB Shell, or a notebook with GemDB as the kernel. The database is already running — GemDB starts it for you. What GemDB asks for, and what it doesn'tEverything in the automatic step lands inside
The
|
| Platform | Status |
|---|---|
| macOS, Apple Silicon | Supported |
| macOS, Intel | Planned |
| Linux, x86-64 and ARM | Planned |
| Windows | Further out — see below |
The limit is one specific thing, not a general lack of portability: GemDB ships
the Python runtime with a native library compiled against a specific database
engine version on the platform it targets. A build missing the right one would
install perfectly and then fail at your first import, so the extension is
published per-platform and simply is not offered where it cannot work. Each
additional platform is a build, not a port — the code already handles them.
Windows is the exception that is genuinely further out. The engine and GemDB's native components both need a Unix environment, so reaching Windows means routing everything through WSL, as Jasper does — a meaningful amount of machinery for an extension whose whole point is a short first run. It is a planned step, not an oversight.
Where things live
Everything GemDB creates is under one directory, ~/GemDB by default
(gemdb.rootPath):
| Path | What it is |
|---|---|
GemStone64Bit<version>-<platform>/ |
the database engine, as downloaded |
db/ |
your database — the only irreplaceable part |
grail/ |
the Python runtime library and native shim |
locks/, log/ |
engine bookkeeping |
The default is ~/GemDB rather than ~/Documents/GemDB on purpose: ~/Documents
is commonly synced to iCloud Drive, and letting a sync daemon copy a live
database extent out from under the engine will corrupt it.
Settings
| Setting | Default | What it does |
|---|---|---|
gemdb.rootPath |
~/GemDB |
where GemDB keeps everything |
gemdb.engineVersion |
(empty) | override the pinned engine version; for development against unreleased builds |
gemdb.reinstallPythonOnUpdate |
true |
refresh Python support in your database when a GemDB update ships a newer one |
Building it
npm install
npm run bundle:grail # assemble the Python payload (needs a C toolchain)
npm run bundle:extent # build the preloaded database (needs an engine + shared memory)
npm run bundle # compile the extension
npm run package # produce the .vsix
Two build artifacts make the shipped extension self-sufficient, and both are gitignored rather than committed.
bundle:grail clones Grail — the Python
implementation that runs inside the database — compiles its CPython shim
against the pinned engine, and stages the result under grail/. The compiled
shim is specific to both the platform and the engine version, so a full
release runs that script once per supported platform against the same working
tree; each run adds its own grail/prebuilt/<platform>/ and leaves the others
alone.
bundle:extent then creates a scratch database, files Python support into it,
and stages the result as extent/gemdb.dbf. Every user's database begins as a
copy of that file, so the file-in runs once here rather than on each user's
machine. Unlike the shim, the extent is portable across platforms — build it
once per release.
Because both are snapshots, "the latest Python support" means "what was latest
when the extension was packaged". Re-run both when cutting a release; a .vsix
built without bundle:extent still works, but falls back to filing Python
support in on first use.
Licence
MIT — see LICENSE. GemDB reuses code from Jasper and bundles Grail, both MIT and both from GemTalk Systems; see NOTICE for details. The database engine is downloaded at install time under its own licence terms.