Skip to main content
Pre-release

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

code2graph Python bindings

code2graph-rs exposes the Rust extractor and resolver as Python values. It returns neutral symbols, references, and edges; it performs no storage or policy work.

Identity wire format

Facts and graphs encode SymbolId losslessly. Global identities use an object with version: 1, scip, and lang; local identities use version: 1, scip, and file. The scip value stays compatible with SCIP tooling, but SCIP has no language or local-file coordinate, so applications must retain the whole object when persisting or forwarding facts. Deserialization also accepts the legacy plain SCIP string for compatibility, though it cannot preserve those identity coordinates. GraphIndex deliberately rejects that lossy form for identity lookup and traversal.

GraphIndex queries

GraphIndex accepts a resolved CodeGraph dictionary whose symbol and edge IDs are lossless structural-ID dictionaries. Python method names and serde payload fields use snake_case:

index = GraphIndex(graph)
index.symbol(symbol_id)  # a locally defined symbol or None
index.symbols_named("run")
index.ids_with_scip(symbol_id["scip"])  # plural: SCIP display strings can collide
index.incoming(symbol_id, 50, "Call", "Scoped", "ScopeGraph")
index.outgoing(symbol_id, 50)
index.impact(symbol_id, 3, 100, "Call", "Scoped", "ScopeGraph")

Global IDs are { "version": 1, "scip": ..., "lang": ... }; local IDs are { "version": 1, "scip": ..., "file": ... }. ids_with_scip is plural because globals with different lang coordinates and locals with different file coordinates can have identical SCIP display strings. Edges may also contain endpoint-only IDs: they are traversable, but symbol returns None for them.

incoming, outgoing, and impact accept optional role, min_confidence, and provenance filters. Valid role values are Call, IsImplementation, Import, ModuleRef, TypeRef, Read, and Write; confidence values are Heuristic, NameOnly, Scoped, and Exact; provenance values are SymbolTable, ScopeGraph, FfiBridge, Conformance, NormalizedName, and External. All provided filters are conjoined. Omitted filters allow every role/provenance and use Heuristic as the confidence floor. limit must be a positive u32; output order is deterministic. impact follows incoming edges, excludes the seed, terminates cycles, and returns { "steps": ..., "truncated": ... }. truncated is true only if a depth or node bound omitted a matching reachable ID; no visited field is returned.

After maturin develop, or after installing the wheel produced by maturin build, run python -m unittest bindings/python/tests/test_query.py from the repository root to exercise this surface.

Release files for code2graph-rs 0.0.0b17

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

Source distribution (sdist)

Source distribution for code2graph-rs 0.0.0b17
File Size Uploaded
code2graph_rs-0.0.0b17.tar.gz 579.7 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for code2graph-rs 0.0.0b17
File
code2graph_rs-0.0.0b17-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details
code2graph_rs-0.0.0b17-cp39-abi3-musllinux_1_2_x86_64.whl CPython 3.9 abi3 Linux musl 1.2+ x86-64 Details
code2graph_rs-0.0.0b17-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 abi3 Linux glibc 2.17+ x86-64 Details
code2graph_rs-0.0.0b17-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.9 abi3 Linux glibc 2.17+ ARM64 Details
code2graph_rs-0.0.0b17-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details
code2graph_rs-0.0.0b17-cp39-abi3-macosx_10_12_x86_64.whl CPython 3.9 abi3 macOS 10.12+ x86-64 Details

Total release size:32.6 MB

Release files / code2graph_rs-0.0.0b17.tar.gz

Download URL code2graph_rs-0.0.0b17.tar.gz
Size 579.7 kB
Tags Source
SHA-256 checksum
How to use checksums
06528e894e77b750ecbd56bb3942716b5c56e3aa49bc615f5a83f592664dfd09
BLAKE2b-256 checksum
How to use checksums
1479e63ddefe22ebd441b36d890335168cbc03e860e45d481e539fdc4cae4bc8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.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 Jul 29, 2026.

Transparency log

Release files / code2graph_rs-0.0.0b17-cp39-abi3-win_amd64.whl

Download URL code2graph_rs-0.0.0b17-cp39-abi3-win_amd64.whl
Size 5.1 MB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
dd88456ec532623e754bde164d21bab93ab03f1a322fbdf7b38ad637eac6b2ed
BLAKE2b-256 checksum
How to use checksums
dc229f9b6e4624793b5068758fa8844ef27b8e88d7d821dccb1ac7efef8921f9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.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 Jul 29, 2026.

Transparency log

Release files / code2graph_rs-0.0.0b17-cp39-abi3-musllinux_1_2_x86_64.whl

Download URL code2graph_rs-0.0.0b17-cp39-abi3-musllinux_1_2_x86_64.whl
Size 5.6 MB
Tags CPython 3.9 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
52065826af439c5a05450f35363c5a8d4063bb097b0f061b17e178b66de8b08e
BLAKE2b-256 checksum
How to use checksums
f66b08589cde0882cc4de64600645590d7d4dbae3d63400e24d30253995bb422
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.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 Jul 29, 2026.

Transparency log

Release files / code2graph_rs-0.0.0b17-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL code2graph_rs-0.0.0b17-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 5.3 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
80fad0a746c08665fe9496edac6185e1244c36383d962a64cf107e79b51046b7
BLAKE2b-256 checksum
How to use checksums
aa70c04cd57cf621d8cb5339d3e7ea196f49fe4b817beed55ee265e3a65caa79
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.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 Jul 29, 2026.

Transparency log

Release files / code2graph_rs-0.0.0b17-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL code2graph_rs-0.0.0b17-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 5.4 MB
Tags CPython 3.9 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
dc7b04b4590bef4385a7f63eddf3d8e7f34238f1444b65f14330704e5613f742
BLAKE2b-256 checksum
How to use checksums
c119896215841fb8ae182eee413f2a7f1c92b0298a71a59890d2d5547833a82f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.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 Jul 29, 2026.

Transparency log

Release files / code2graph_rs-0.0.0b17-cp39-abi3-macosx_11_0_arm64.whl

Download URL code2graph_rs-0.0.0b17-cp39-abi3-macosx_11_0_arm64.whl
Size 5.4 MB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
43041018b489a6e39e230c0d1e9441de0b1a5b3f3f1cd964fc9cd04d2e89eb3e
BLAKE2b-256 checksum
How to use checksums
4e819550fc55ef3e5f6769c0b8a37d58f47fceff80d4d04e31df1287c1b6c4ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.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 Jul 29, 2026.

Transparency log

Release files / code2graph_rs-0.0.0b17-cp39-abi3-macosx_10_12_x86_64.whl

Download URL code2graph_rs-0.0.0b17-cp39-abi3-macosx_10_12_x86_64.whl
Size 5.2 MB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
4cb183e4be58f115759d5d505c2c32b51d3e9971f4172dd8151893211635e4c8
BLAKE2b-256 checksum
How to use checksums
471a7b206c91831b0cdcea3810b2d76fc2b56e5b1aadf15e4df44807f18a2959
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.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 Jul 29, 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