Skip to main content

TypeBridge connects typed Python, TypeScript, and Rust applications to TypeDB through one semantic engine.

CI PyPI npm crates.io Documentation MIT license

TypeBridge is a typed application toolkit for TypeDB. A versioned Split-YAML workspace is the schema authority. TypeBridge validates that workspace and generates Python, TypeScript/Node, Rust, and C bindings that share one Rust-owned schema, query, migration, validation, and ORM engine.

One system, four generated SDKs

Surface Generated application API Distribution
Python Value classes, model managers, transactions, direct/remote queries type-bridge
TypeScript / Node Branded values, model managers, native and remote queries @type-bridge/node
Rust Schema-bound create/model types, async CRUD and immutable queries type-bridge
C Generated nominal models, transactions, direct/remote queries Ubuntu 24.04 x86_64 shared runtime
CLI Split-YAML checks, migrations, and all four projections Python package or standalone Linux archive
Server Remote V2 query execution over the same generated contract ghcr.io/ds1sqe/type-bridge-server

TypeBridge preserves TypeDB concepts directly: independent attributes, entities, relations, roles, inheritance, cardinality, ordering, keys, and uniqueness remain typed from schema through hydrated results.

Start from Split-YAML

Install the CLI and Python runtime:

pip install type-bridge

Create typebridge.yaml, a schema-set manifest, and one or more schema fragments. Configure the generated package output in the workspace, then run:

type-bridge --manifest typebridge.yaml schema check
type-bridge --manifest typebridge.yaml schema generate
type-bridge --manifest typebridge.yaml migration make --name initial
type-bridge --manifest typebridge.yaml migration apply --environment development

One generation snapshot writes every configured Python, TypeScript, Rust, and C package. Generated packages privately embed the verified authority used by their managers and direct or remote queries, so ordinary applications never configure or read an external authority JSON. A workspace deploying the optional generic server can additionally configure artifacts.schema-authority.output; the server mounts that generated, source-free artifact instead of compiling YAML or accepting a user-maintained JSON schema.

The generated Python package owns the concise single-type manager:

from app_models import Age, Person, PersonId
from type_bridge import Database

db = Database(address="localhost:1729", database="example")
db.connect()

ada = Person(person_id=PersonId("ada"), age=Age(36))
Person.manager(db).put(ada)
people = Person.manager(db).filter(age__gte=18).all()

Use its package-local query session when a query spans types:

session = Person.query(db)
person = session.exact(Person)
adults = (
    session.query(person)
    .where(person.field(Person.age).gte(Age(18)))
    .rows(limit=100)
)

Continue with the Python quick start, Split-YAML reference, and data guide.

TypeScript / Node

npm install @type-bridge/node

Import application values from the generated package and connection primitives from @type-bridge/node:

import { RustDatabase } from "@type-bridge/node";
import { Age, Person, PersonId } from "./generated/models/index.js";

const db = RustDatabase.connect("localhost:1729", "example", {
  username: "admin",
  password: "password",
});
const ada = Person.create({
  personId: PersonId.create("ada"),
  age: Age.create(36n),
});
Person.manager(db).put(ada);
const people = Person.manager(db).filter({ age__gte: Age.create(18n) }).all();

See the TypeScript/Node guide for generated managers, transactions, and direct/remote queries.

Rust

The same workspace emits a schema-bound Rust crate. The generated SDK uses Rust 1.88+ and the crates.io type-bridge runtime:

[dependencies]
type-bridge = "2"

Follow the Rust client guide for generation, direct execution, transactions, and remote queries.

C

TypeBridge 2.2.3 ships a C ABI 1.6.0 shared runtime and standalone CLI for Ubuntu 24.04 on x86_64 GNU/Linux. Generate an application schema package from Split-YAML, then link C17 or C++17 consumers with CMake or pkg-config.

See the C SDK guide for signed archives, installation, generation, and the exact supported matrix.

Documentation

Development

uv sync --extra dev
uv run pytest
./test.sh
./scripts/check.sh all
uv run --extra docs mkdocs build --strict

See DEVELOPMENT.md for repository boundaries and verification.

License

TypeBridge-authored code is MIT licensed. Native artifacts also include third-party TypeDB components under Apache-2.0 and MPL-2.0; exact notices ship with each artifact.

Metadata

Release files for type-bridge 2.2.4

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

Source distribution (sdist)

Source distribution for type-bridge 2.2.4
File Size Uploaded
type_bridge-2.2.4.tar.gz 194.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for type-bridge 2.2.4
File Interpreter ABI Platform
type_bridge-2.2.4-py3-none-any.whl Python 3 none any Details

Total release size: 442.3 kB

Release files / type_bridge-2.2.4.tar.gz

Download URL type_bridge-2.2.4.tar.gz
Size 194.2 kB
Tags Source
SHA-256 checksum
How to use checksums
dfca6bfa3a38e95017718e071c946fb691756b4e3b41444b94c1b96d1614b0ee
BLAKE2b-256 checksum
How to use checksums
fd2564a6e413d80e4a51b17dfadd832fc43524633230557f2ca35e0a90d01dcd
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 Oct 8, 2026.

Transparency log

Release files / type_bridge-2.2.4-py3-none-any.whl

Download URL type_bridge-2.2.4-py3-none-any.whl
Size 248.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
186077fcd72ffece5b42811d2acb0366aaef5746a3776d86b673b718bf432309
BLAKE2b-256 checksum
How to use checksums
6e3d66206f586ce0b7014a31937c9b21e76e8d37174e76bdd4630a7a53fc7aec
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 Oct 8, 2026.

Transparency log

Release history Release notifications | RSS feed

2.2.5

2 release files

This release

2.2.4 This release

2 release files

2.2.3

2 release files

2.2.2

2 release files

2.2.1

2 release files

2.2.0

2 release files

2.1.0

2 release files

2.0.2

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.5.11

2 release files

1.5.10

2 release files

1.5.9

2 release files

1.5.8

2 release files

1.5.6

2 release files

1.5.5

2 release files

1.5.4

2 release files

1.5.3

2 release files

1.5.2

2 release files

1.5.1

2 release files

1.5.0

2 release files

1.4.5

2 release files

1.4.4

2 release files

1.4.3

2 release files

1.4.2

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.7

2 release files

1.2.6

2 release files

1.2.5

2 release files

1.2.4

2 release files

1.2.3

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.9.4

2 release files

0.9.3

2 release files

0.9.2

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.4

2 release files

0.6.3

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.5

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.4

2 release files

0.3.2

2 release files

0.3.0

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

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