Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Aura

Aura is a gradually-typed programming language that transpiles to Python. It combines a clean, unambiguous syntax with the entire Python ecosystem: first-class PyPI interop, a standard library, native threads and coroutines, and post-quantum cryptography.

Status: alpha (0.1.0a7). The syntax is standardized and frozen for the alpha series; see the grammar and the changelog.

Installation

pip install aura-language            # from PyPI
# or from a checkout:
pip install .
aura run examples/hello.aura

Optional post-quantum backend (recommended for real secrets):

pip install "aura-language[pqc]"     # adds cryptography>=44 (ML-KEM/ML-DSA)

Requires Python 3.10+. The runtime has no mandatory third-party dependencies (on 3.10, tomli is installed automatically for reading aura.toml).

Quick Start

aura init myapp
aura run myapp/src/main.aura

From a source checkout without installing:

git clone https://github.com/JoaoValentimTheo/aura-lang.git
cd aura-lang
python3 main.py run examples/hello.aura

The Language

Aura has exactly one spelling per construct — no synonyms. The full grammar lives in docs/GRAMMAR.md. Highlights:

// Functions, generics and traits.
def max[T](a: T, b: T) -> T {
  return a > b ? a : b
}

trait Shape {
  public def area() -> float
}

class Circle implements Shape {
  private let r: float = 1.0
  public def new(r: float) { self.r = r }
  public def area() -> float { return 3.14159 * self.r * self.r }
}

def parse(text) -> int | none {
  guard text.length() > 0 else { return none }
  return try { int(text) } catch e { none }
}

// The entry point: `aura run` invokes `main` for you.
def main() {
  // Immutable by default; opt into mutation.
  let name = "Aura"
  let mut count = 0
  count += 1

  // Pattern matching, pipes, guard clauses, error handling.
  let label = match count {
    case 0 -> "zero"
    case n if n > 0 -> "positive"
    case _ -> "other"
  }

  let sum = [1, 2, 3, 4] |> filter((x) => x % 2 == 0) |> reduce((a, x) => a + x, 0)
}

Canonical spellings include def (not fn), new (not init), none (not null), not/and/or (not !/&&/||), and [T] generics (not <T>). Removed spellings raise a clear SyntaxError.

Concurrency

Aura supports native OS threads and async def/await.

Threads (globals are shared; guard them with a lock):

import stdlib.threading as threading

let mut total = 0
let lock = threading.lock()

def worker(n) {
  let mut i = 0
  while i < n {
    lock.acquire()
    total += 1
    lock.release()
    i += 1
  }
}

def main() {
  let t = threading.spawn((x) => worker(x), 100)
  t.join()
  print(total)
}

Coroutines:

import stdlib.asyncio as aio

async def work(n) {
  await aio.sleep(0.01)
  return n * 2
}

async def main() {
  let results = await aio.gather(work(1), work(2), work(3))
  print(results)
}

See aura/stdlib/README.md for the full API.

Cryptography

stdlib.crypto provides real SHA-2/SHA-3/SHAKE hashing, HMAC, HKDF and secure randomness, plus post-quantum ML-KEM (FIPS 203) and ML-DSA (FIPS 204) behind a pluggable backend. Install the pqc extra for a vetted implementation; otherwise a clearly-labelled reference backend is used and require_production_backend() fails loudly.

import stdlib.crypto as crypto

def main() {
  print(crypto.sha3_256("hello"))

  let kp = crypto.kem_keypair()
  let enc = crypto.kem_encapsulate(kp.public_key)
  let shared = crypto.kem_decapsulate(kp.secret_key, enc.ciphertext)

  let signer = crypto.dsa_keypair()
  let sig = crypto.dsa_sign(signer.secret_key, "payload")
  print(crypto.dsa_verify(signer.public_key, "payload", sig))
}

Python Interop

Aura transpiles to Python, so community PyPI packages are first-class. Install one with aura add, declare it in aura.toml, then import it directly, or use the explicit bridge for dynamic access:

import python

def main() {
  let requests = python.import_module("requests")
  let text = requests.get("https://example.com").text

  let re = python.load("re")
  print(re.findall("[0-9]+", "a1b22c333"))

  print(python.eval("sum(range(10))"))
}

The bridge exposes import_module, load, eval, exec_code, call, getattr/setattr/hasattr, is_available, to_aura/to_python, and more. See aura/stdlib/python.py.

Aura Patterns (AUP)

AUP is a catalog of idiomatic solutions — option, builder, strategy, pipelines, error handling, memoization, observer, resource management, worker pools and hybrid crypto. Every pattern is a runnable program under examples/aup/:

Pattern File
Option (result-or-null) examples/aup/option.aura
Builder examples/aup/builder.aura
Strategy (traits) examples/aup/strategy.aura
Pipeline examples/aup/pipeline.aura
Typed error handling examples/aup/error_handling.aura
Memoization / caching examples/aup/memoize.aura
Observer examples/aup/observer.aura
Resource management examples/aup/resource.aura
Worker pool examples/aup/worker_pool.aura
Hybrid secure message examples/aup/hybrid_crypto.aura

CLI

Installed as aura <command>; the same commands work via python3 main.py <cmd>.

Command Description
aura run <file> [-v] Transpile and execute (optionally show Python)
aura transpile <file> [-o out.py] Convert Aura to Python
aura check <file> Type, mutability and rule checks
aura format <file> Format source
aura lint <file> Style warnings (non-zero exit on warnings)
aura test <dir> Run .aura files
aura repl Interactive REPL
aura init [name] Create aura.toml and src/main.aura
aura add <pkg> Add and install a dependency
aura install Install dependencies from aura.toml
aura deps List declared dependencies
aura version [bump] Show or bump the version
aura debug <file> [-t] Run under the trace debugger
aura lsp Start the language server (stdio)

REPL

aura repl
aura> let mut total = 0
aura> for i in 1..5 { total += i }
aura> total
10
aura> :type total
int  (value: 10)
aura> import python
aura> python.eval("2 ** 8")
256
aura> :q

The REPL enforces the same rules as aura check, including mutability across chunks, and supports top-level await.

Command Description
:help Show help
:vars List session bindings
:type <expr> Evaluate and show the value/type
:ast <code> Print the syntax tree
:py <code> Run raw Python in the session
:load <file> Execute an Aura file into the session
:run <file> Run an Aura file as a program
:history Show entered chunks
:reset Clear all bindings
:q Quit

A bare expression prints its value and stores it in _. Multi-line input continues automatically while brackets are open or a line ends with a continuation token.

Documentation

Development

python3 -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"            # pytest, coverage, hypothesis, ruff, mypy

python -m pytest tests/ -q         # full suite
python -m pytest tests/ --cov=aura # with coverage (floor: 65%)
ruff check aura/                   # lint
mypy aura/                         # types

The suite covers every syntax construct, the full object system, concurrency, cryptography and hardening regressions, and runs the generated .aura corpora. It also includes property-based tests (Hypothesis) for the lexer, parser and transpiler, a differential suite that compares Aura against equivalent Python, and tests that enforce the diagnostics catalogue and the Aura Pattern standard. See CONTRIBUTING.md for the architecture and how to add a language feature.

License

MIT — see LICENSE.

Release files for aura-language 0.1.0a10

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

Source distribution (sdist)

Source distribution for aura-language 0.1.0a10
File Size Uploaded
aura_language-0.1.0a10.tar.gz 211.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aura-language 0.1.0a10
File Interpreter ABI Platform
aura_language-0.1.0a10-py3-none-any.whl Python 3 none any Details

Total release size: 370.0 kB

Release files / aura_language-0.1.0a10.tar.gz

Download URL aura_language-0.1.0a10.tar.gz
Size 211.5 kB
Tags Source
SHA-256 checksum
How to use checksums
c4c928d7380d819b3bdaff100e10e17546f829fd781c0f465e8a9d8c085746ec
BLAKE2b-256 checksum
How to use checksums
96c9c0e98e628d81c36714c962ec54a14e575108a41602711c14a11c1e5d283b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 17, 2026.

Transparency log

Release files / aura_language-0.1.0a10-py3-none-any.whl

Download URL aura_language-0.1.0a10-py3-none-any.whl
Size 158.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
13fd7fdc54d1a851f5c8fad37ec4ae9151786115c16c685f23c20ce1629abdec
BLAKE2b-256 checksum
How to use checksums
722eb043b2a53faa2c540c5f9fd640566e23b82acadab4882ad71540d91dcb22
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 17, 2026.

Transparency log
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