Skip to main content

Largo

A scripting language whose runtime is a persistent object database.

Largo is a Python-ish scripting language with an unusual property: its entire runtime — every value, every live task, every stack frame — lives in a transactional database on disk at all times. Pull the plug mid-execution and the system resumes exactly where it left off. No checkpointing. No save/restore logic. No crontabs.

Tasks run cooperative async style, suspending on time, I/O, or data changes. A suspended task consumes no CPU or memory — it simply sits on disk until its condition is met, then resumes.

For more information see largolang.org or here for the full language reference.

Discuss on Telegram.

Installation

pip install largolang           # core
pip install largolang[llm]      # + Ollama support for LLM primitives
pip install largolang[telegram] # + httpx for Telegram primitives
pip install largolang[all]      # everything

Getting Started

After installation, run with:

largo

If there is an init.largo file in the current directory, it will run that (every time, so be sure it's idempotent). This file must provide certain built-ins which the largo compiler relies on, so be sure to clone the package init.largo as a starting point if you go this route. By default it will load the one shipped with largo.

There is no prompt (because stdout is a mashup of debugging output at this stage), but you can enter single-line statements to largo's stdin--most usefully import statements.

See Ostinato for some sample largo code.

Crufy console:

Type ctrl-C or /quit to exit. Hit enter to see if there are any pending console questions. Type "# - answer" to answer a console question, as in "2 - yes". /ls and /cd are cryptic and dangerous debugging commands. Use at your own risk. Anything not an answer or slash command is parsed as a one-line statement and spawned, but the output is not printed by default so wrap in a print() if you want to see the output. Console questions are asked with ask_root(question).

Try this (copy-paste to largo stdin):

print("Your favorite color is {ask_root("What's your favorite color?")}")

Then (after hitting return a few times to see how it works) answer with, e.g., "1 - blue".

Syntax highlighting

A Vim syntax file (largo.vim) is included in the package. To install it, find it in the package and copy it to (or symlink it from) ~/.vim/syntax

pip show largolang | grep Location          # Where the package lives
cp .../largolang/largo.vim ~/.vim/syntax    # Replace ... with that dir

Then add to your .vimrc:

au BufRead,BufNewFile *.largo set filetype=largo

Status

Pre-alpha. Usable as far as it goes, but with gaps — some things simply haven't been needed yet. Not ready for production use, but a good time to get involved if you want to help shape a new language.

Metadata

Release files for largolang 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for largolang 0.1.1
File Size Uploaded
largolang-0.1.1.tar.gz 113.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for largolang 0.1.1
File Interpreter ABI Platform
largolang-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 229.7 kB

Release files / largolang-0.1.1.tar.gz

Download URL largolang-0.1.1.tar.gz
Size 113.8 kB
Tags Source
SHA-256 checksum
How to use checksums
a4fce178f4114c555173fa218a3b950036910a6d55c8d275465d06c05ec0c357
BLAKE2b-256 checksum
How to use checksums
3106779d04ec8ff2704c76b1220078fdb59a873314d42e8b951fa3bc5170e3da
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / largolang-0.1.1-py3-none-any.whl

Download URL largolang-0.1.1-py3-none-any.whl
Size 115.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
82deac94d5a913eefb3fd5471b0167d37d502d8e00837a1eb554758467eee8c6
BLAKE2b-256 checksum
How to use checksums
3a2f98ad6a254018657a3609994dbfdc6ddb3a1ade4c15532cf7720a451dac47
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page