1
0
Fork
You've already forked libreda-python
0
Python bindings for LibrEDA.
  • Rust 93.9%
  • Python 6.1%
2025年10月12日 16:08:34 +00:00
.reuse Partial binding for netlist. 2021年11月25日 13:39:55 +01:00
LICENSES REUSE compliance. 2022年05月11日 16:15:21 +02:00
src upgrade to pyo3 0.26 2025年10月12日 16:08:34 +00:00
.gitignore REUSE compliance. 2022年05月11日 16:15:21 +02:00
Cargo.toml upgrade to pyo3 0.26 2025年10月12日 16:08:34 +00:00
README.md Update install instructions. 2022年12月03日 19:40:29 +01:00
test.py fix method name and spelling 2025年10月12日 15:25:21 +00:00

libreda-python

Work-in-progress

Python binding for libreda-db.

Install

Create a Python virtual environment:

python -m venv myPythonEnv
source myPythonEnv/bin/activate
# Install maturin (build tool for Rust-based Python packages)
pip install maturin

Download and install libreda-python:

# LibrEDA consists of many Rust libraries. The workspace bundles them together.
git clone --recursive https://codeberg.org/LibrEDA/libreda-rs-workspace libreda
cd libreda/libreda-python
# Install in development mode.
maturin develop

Run a Python shell and import libreda:

python
import libreda as db
chip = db.Chip()
my_cell = chip.create_cell("A")
# Write verilog.
writer = db.io.VerilogWriter()
writer.write_netlist(chip, "output.v")
# Read verilog.
reader = db.io.VerilogReader()
netlist = reader.read_netlist("output.v")