Skip to main content

A boring semantic layer built with ibis

Project description

Boring Semantic Layer (BSL)

The Boring Semantic Layer (BSL) is a lightweight semantic layer based on Ibis.

Key Features:

  • Lightweight: pip install boring-semantic-layer
  • Ibis-powered: Built on top of Ibis, supporting any database engine that Ibis integrates with (DuckDB, Snowflake, BigQuery, PostgreSQL, and more)
  • MCP-friendly: Perfect for connecting LLMs to structured data sources

Quick Start

pip install 'boring-semantic-layer[examples]'

1. Define your ibis input table

import ibis

# Create a simple in-memory table
flights_tbl = ibis.memtable({
    "origin": ["JFK", "LAX", "JFK", "ORD", "LAX"],
    "carrier": ["AA", "UA", "AA", "UA", "AA"]
})

2. Define a semantic table

from boring_semantic_layer import to_semantic_table
flights = (
    to_semantic_table(flights_tbl, name="flights")
    .with_dimensions(origin=lambda t: t.origin)
    .with_measures(flight_count=lambda t: t.count())
)

3. Query it

result_df = flights.group_by("origin").aggregate("flight_count").execute()

📚 Documentation

→ View the full documentation


This project is a joint effort by xorq-labs and boringdata.

We welcome feedback and contributions!


Freely inspired by the awesome Malloy project. We loved the vision, just took the Python route.

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

boring_semantic_layer-0.3.14.tar.gz (1.4 MB view details)

Uploaded Source

Built Distribution

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

boring_semantic_layer-0.3.14-py3-none-any.whl (614.1 kB view details)

Uploaded Python 3

File details

Details for the file boring_semantic_layer-0.3.14.tar.gz.

File metadata

  • Download URL: boring_semantic_layer-0.3.14.tar.gz
  • Upload date:
  • Size: 1.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.15 {"installer":{"name":"uv","version":"0.11.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for boring_semantic_layer-0.3.14.tar.gz
Algorithm Hash digest
SHA256 bf365106dfa2b4c650eb21d385b0f128c69f3c2071dbb9c3022c417ac674078c
MD5 3b16cfea5ba895a52bfa27a7e8cdbacd
BLAKE2b-256 c2656f17e09a6be192dbf0fbd94745f2804b5eca49d29d8c127f68cb8e82bfcb

See more details on using hashes here.

File details

Details for the file boring_semantic_layer-0.3.14-py3-none-any.whl.

File metadata

  • Download URL: boring_semantic_layer-0.3.14-py3-none-any.whl
  • Upload date:
  • Size: 614.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.15 {"installer":{"name":"uv","version":"0.11.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for boring_semantic_layer-0.3.14-py3-none-any.whl
Algorithm Hash digest
SHA256 ade6e1da21177ba5629fbd24d8392cb62dcc7d98f5aebce137501c657b30e62f
MD5 f212b30b13905f40e873c65a866d00d6
BLAKE2b-256 620d51b06ce97a6bd11c9a84ff83f6ab7535cb20dcb0b1702954936b090bc7fa

See more details on using hashes here.

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