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. It defines and evolves schemas, generates application models, and provides native Python, TypeScript/Node, and Rust data APIs. One Rust semantic engine owns schema, query, migration, validation, and ORM behavior across every SDK and the standalone query server.

One system, several ways in

2.0.2 is a compatibility-notice and dependency-security maintenance release. Read the exact expanded 2.1 inventory and safe pins before upgrading beyond 2.0.x. No API is removed or new warning added here.

Surface Use it for Distribution
Python Declarative Pydantic models, CRUD, queries, schema management type-bridge
TypeScript / Node Branded models, typed managers, queries, native runtime @type-bridge/node
Rust Generated schema crates, async CRUD and immutable queries type-bridge
CLI and generators Split-YAML schemas, migrations, Python/Node/Rust projections Included with the Python package
Server Remote V2 query execution over the same contracts ghcr.io/ds1sqe/type-bridge-server

TypeBridge is designed around TypeDB rather than flattened into a relational ORM shape:

  • attributes remain independent types owned by entities and relations;
  • roles, inheritance, cardinality, ordering, @key, and @unique stay typed;
  • schema generation and migration use the same rules as runtime queries;
  • direct and remote immutable queries preserve typed, owner-aware results;
  • Python and Node are thin facades over the shared Rust runtime.

Start with Python

Requires Python 3.12–3.14 and a supported TypeDB 3.x server.

pip install type-bridge
from type_bridge import Database, Entity, Flag, Integer, Key, SchemaManager, String

class PersonId(String):
    pass

class Age(Integer):
    pass

class Person(Entity):
    person_id: PersonId = Flag(Key)
    age: Age | None = None

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

schema = SchemaManager(db)
schema.register(Person)
schema.sync_schema()

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

Continue with the Python quick start, then choose the model, data, or schema workflow.

TypeScript / Node

npm install @type-bridge/node
import { Entity, Key, attr, field } from "@type-bridge/node";

class PersonId extends attr.String("person-id") {}
class Person extends Entity("person", {
  personId: field(PersonId, Key),
}) {}

const ada = new Person({ personId: new PersonId("ada") });

See the TypeScript/Node guide for native targets, database lifecycle, managers, queries, and generation.

Schema-first and Rust workflows

The V2 workspace makes a versioned Split-YAML schema the authority and projects it into each configured SDK:

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

The generated Rust SDK requires Rust 1.88+ and, starting with 2.0.1, resolves from crates.io with type-bridge = "2". TypeBridge 2.0.0 remains available from its exact Git revision. Follow the Rust client guide and Split-YAML reference for the reproducible setup.

Documentation

TypeBridge 2.0.x supports TypeDB 3.8–3.12. Support for 3.8 and 3.10 is deprecated and scheduled for removal in 2.1; consult the compatibility matrix and deprecation inventory before upgrading production deployments.

Development

PYO3_USE_ABI3_FORWARD_COMPATIBILITY=1 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 layout, test tiers, docs architecture, and contribution checks.

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 and are documented in type-bridge-core/vendor/README.md.

Metadata

Release files for type-bridge 2.0.2

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.0.2
File Size Uploaded
type_bridge-2.0.2.tar.gz 255.2 kB Details

Built distribution (wheel)

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

Total release size: 575.8 kB

Release files / type_bridge-2.0.2.tar.gz

Download URL type_bridge-2.0.2.tar.gz
Size 255.2 kB
Tags Source
SHA-256 checksum
How to use checksums
4f8da4945c923d7da0171da53aefa27fb9c5d78cd07615dd5795b41444fc9357
BLAKE2b-256 checksum
How to use checksums
d311d1d02eb70a5f6b7c7c69c654dc53cb3846b78d61274177a9c92be33045a6
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 7, 2026.

Transparency log

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

Download URL type_bridge-2.0.2-py3-none-any.whl
Size 320.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
32de7653ae89a7a33ecfee26c7390d42025297c310d44f04f1b71608c950cf91
BLAKE2b-256 checksum
How to use checksums
a670f9b9189bab1ff14f9e6e3bb1072dc0b220ebe5d7e8e2a8a3d8b9ecdb5d00
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 7, 2026.

Transparency log

Release history Release notifications | RSS feed

2.2.2

2 release files

2.2.1

2 release files

2.2.0

2 release files

2.1.0

2 release files

This release

2.0.2 This release

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