Skip to main content

pell

A statically-typed language that compiles to Oracle PL/SQL 19c / 23ai. Modern syntax, real type checking, ergonomic SQL — and the emitted PL/SQL is a deployable, human-readable, SHA-anchored artifact you commit, audit, and git blame like any other code.

Install

# Core compiler (zero deps)
pip install pell

# + Oracle driver + REPL (for `pell exec`, `pell repl`, `pell sql`, `pell deploy`)
pip install "pell[repl]"

After install, pell is on your PATH:

pell --help
pell build src/hello.pell
pell repl

One look at the lowering

// src/hr/employees.pell
module hr.employees;

pub record Employee { id: number, name: text, level: number }
pub error NotFound { id: number }

pub fn promote(id: number) -> Result<Employee, NotFound> {
    let row: Employee = sql! {
        select id, name, level from employees where id = :id
    }.one()?;
    return Ok(Employee {
        id:    row.id,
        name:  row.name,
        level: row.level + 1,
    });
}

…lowers to PL/SQL you'd write by hand:

CREATE OR REPLACE PACKAGE hr.employees AS
  TYPE t_employee IS RECORD (
    id    NUMBER,
    name  VARCHAR2(4000),
    level NUMBER
  );
  FUNCTION promote(p_id IN NUMBER) RETURN t_employee;
END employees;
/

CREATE OR REPLACE PACKAGE BODY hr.employees AS
  FUNCTION promote(p_id IN NUMBER) RETURN t_employee IS
    l_row t_employee;
    l_ret t_employee;
  BEGIN
    SELECT id, name, level
      INTO l_row
      FROM employees
     WHERE id = p_id;
    l_ret.id    := l_row.id;
    l_ret.name  := l_row.name;
    l_ret.level := (l_row.level + 1);
    RETURN l_ret;
  EXCEPTION
    WHEN NO_DATA_FOUND THEN
      RAISE pell_runtime.hr_employees_notfound;
  END promote;
END employees;
/

Features

  • Generics & sum types — Result<T, E>, Option<T>, list<T>
  • Real string interpolation — "got {count} tables" with auto-stringify for any type
  • Embedded SQL — sql! { ... } with .one() / .collect() / .first() terminators driving the right SELECT INTO shape
  • JSON / regex / jq-style queries — first-class, using Oracle 23ai JSON_OBJECT_T natively
  • Notebook-style REPL — variable persistence across cells, \load files, catalog:: data dictionary helpers
  • Deployment artifact — .sql output is SHA-anchored, byte-stable with --reproducible, meant to be committed

Learn more

License

MIT — see LICENSE.

Metadata

Release files for pell 0.1.0

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

Source distribution (sdist)

Source distribution for pell 0.1.0
File Size Uploaded Provenance Actions
pell-0.1.0.tar.gz 127.0 kB Without provenance Details for pell-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 234.6 kB

Release files / pell-0.1.0.tar.gz

Download URL pell-0.1.0.tar.gz
Size 127.0 kB
Tags Source
SHA-256 checksum
How to use checksums
8181214f57dfa1e2a638cf516631a6a8284207f8578e281ff8ebdab6f6446f87
BLAKE2b-256 checksum
How to use checksums
ee730f6425b2ea0f98b6181f1212c98c909cc15f7e83fde50cf11dd3fecbee7d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / pell-0.1.0-py3-none-any.whl

Download URL pell-0.1.0-py3-none-any.whl
Size 107.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
17c4b9d6b2d49da4623ab5844836d5824125294b047d11a721b134cd449e2035
BLAKE2b-256 checksum
How to use checksums
5dffef22f1d428c063f8e0e5495327171226296c28da704294f2f3ea3202e335
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Security for pell 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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