Native Shell
Native Shell:AI 生成的 UI,在你的應用中原生呈現,涵蓋每個平台。iOS、Android、macOS、Windows 與 Linux 上的應用、GPUI 應用與網頁在執行時載入已簽名、沙箱隔離的 TSX 模組並繪製 th
AI 翻譯
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證Dataframe for graphs. Built in Rust.
翻譯準備中
取自儲存庫 README
正在載入完整 README。
檢視完整 README ↗Polars-shaped dataframes for graph data.
Ursa is a graph analytics library for Python. You write a query the way you write a Polars query. A Rust engine runs it: Apache Arrow for the data, DataFusion for the plan, and parallel, deterministic kernels for the algorithms.
There is no Graph object. An edge table is the graph. Every operation returns a table.
Documentation: https://cldixon.github.io/ursa/
pip install ursa-graph # then: import ursa
# or
uv add ursa-graph
The package on PyPI is ursa-graph. The import name is ursa. Wheels include the compiled core, so you need no Rust toolchain. Python 3.10 or later.
polars is optional. Install pip install 'ursa-graph[polars]' for .to_polars() and ur.from_polars(). Data crosses the boundary as Arrow either way.
Paste this into a Python session. It needs no files and no network.
import ursa as ur
edges = ur.datasets.load_karate() # 34 nodes, 78 edges, bundled with the package
top = (
edges.nodes()
.with_columns(
degree=ur.degree(edges, direction="both"),
triangles=ur.triangle_count(edges),
community=ur.louvain(edges, seed=1),
)
.sort("degree", descending=True)
.head(5)
.collect() # one query in the engine; the result is Arrow data
)
print(top)
shape: (5, 4)
┌───────┬────────┬───────────┬───────────┐
│ id ┆ degree ┆ triangles ┆ community │
│ --- ┆ --- ┆ --- ┆ --- │
│ int64 ┆ uint32 ┆ uint32 ┆ uint32 │
╞═══════╪════════╪═══════════╪═══════════╡
│ 33 ┆ 17 ┆ 15 ┆ 2 │
│ 0 ┆ 16 ┆ 18 ┆ 0 │
│ 32 ┆ 12 ┆ 13 ┆ 2 │
│ 2 ┆ 10 ┆ 11 ┆ 0 │
│ 1 ┆ 9 ┆ 12 ┆ 0 │
└───────┴────────┴───────────┴───────────┘
To run the same query over your own data, change the first line:
edges = ur.scan_edges("edges.parquet", src="from_id", dst="to_id")
Nothing after that line changes. See the quickstart.
with_columns, filter, sort, select, group_by, join. Lazy until collect(). If you know Polars, you know the shape.Ursa is version 0.4 and in active development. The Limits page lists what does not run yet.
| Layer | Language | Role |
|---|---|---|
python/ursa | Python | The API: signatures and docs, converting your data to Arrow, getting results out. Each frame method calls into Rust. |
ursa-plan | Rust | The plan a frame holds: it validates each step as you add it, and runs the whole plan as one DataFusion query, with graph operations as plan nodes. |
ursa-core | Rust | The CSR topology index and the kernels. Parallel with rayon; compiles for wasm32 without it. |
ursa-py | Rust | PyO3 bindings. Arrow crosses as zero-copy capsules; the GIL is released during compute. |
The design document is design/SPEC.md.
uv sync # builds the extension and installs the dev tools
uv run pytest # the Python suite, including every example in the docs
cargo test --workspace # the Rust suites
uv run ruff check . && uv run ty check
uv sync --group docs && uv run zensical serve # the documentation site, served locally
The docs are in docs/, built with Zensical and served by GitHub Pages. Every ```python block in them runs in the test suite, so an example that stops working fails CI. The benchmark harness is in benchmarks/.
MIT OR Apache-2.0.