Skip to main content

Interactive Quarb — a session REPL where every line becomes a reusable query (&1, &2, …)

Project description

quai

Interactive Quarb — a session REPL where every line becomes a reusable query.

pip install quai
quai data.json

quai opens a session over one or more sources and holds it. Each line you run is labelled &1, &2, … — and every label is a reusable macro: not the printed value, but the query that produced it, ready to continue through the pipe. It is the notebook loop, cell by cell, except a cell is a path into your data.

&1  /teams/*/members/*
    /teams/0/members/0  ⋮  (every member, across all teams, one path)
&2  &1 | [/langs/*:: = 'Go'] | /name::
    ada
    eu
&3  &1 @| count
    6
  • &N re-runs line N; continue with a pipe (&N | /key::, &N | [pred], &N @| count).
  • &N# replays line N's output frozen, as it was when it ran.
  • def &x: … ; adds a named fragment; :history, :reset, :help, :quit are the commands.

The engine rides in on the quarb dependency, so quai reaches every local source quarb does — JSON, YAML, TOML, CSV, XML, HTML, Markdown, SQLite, kaiv, the filesystem, git, archives, XLSX, and source code — and several at once mount under one root for cross-source <=> joins.

Try it in the browser at demo.quarb.org/quai (no install), and read the graph cookbook for the recipes.

License

Licensed under either of Apache License, Version 2.0 or the MIT license at your option.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

quai-0.3.0.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

quai-0.3.0-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file quai-0.3.0.tar.gz.

File metadata

  • Download URL: quai-0.3.0.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for quai-0.3.0.tar.gz
Algorithm Hash digest
SHA256 bc0fe763e6664db81b068da6b9665d57aa917748eec00051a2493ddba185ab0b
MD5 8d42e0129eb6d8f579357756d1a221cb
BLAKE2b-256 cd9ee2a7cd30ac0ee5623e04539d5a7c3b3271f48f61ea8c702f7cea1f3bba51

See more details on using hashes here.

Provenance

The following attestation bundles were made for quai-0.3.0.tar.gz:

Publisher: publish-pypi-quai.yml on deyanovich/quarb-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file quai-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: quai-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 6.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for quai-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f79def63cf3af6f4490a1086484e9be7584a233ec56e2fb4c187df4d9f113827
MD5 47286821783e19c882f131b581d5e75e
BLAKE2b-256 eadc38c7aca8ca5da4c30630b94f7b800787ec6b3239edcbe3bf8f113c63ea0b

See more details on using hashes here.

Provenance

The following attestation bundles were made for quai-0.3.0-py3-none-any.whl:

Publisher: publish-pypi-quai.yml on deyanovich/quarb-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page