<!--
SPDX-FileCopyrightText: 2022 Thomas Kramer
SPDX-License-Identifier: CC-BY-SA-4.0
-->
# libreda-python
*Work-in-progress*
Python binding for [libreda-db](https://codeberg.org/LibrEDA/libreda-db).
## Install
Create a Python virtual environment:
```sh
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:
```sh
# 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`:
```sh
python
```
```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")
```
Raw data
{
"_id": null,
"home_page": "https://libreda.org",
"name": "libreda-python",
"maintainer": null,
"docs_url": null,
"requires_python": "",
"maintainer_email": null,
"keywords": "vlsi,python",
"author": "Thomas Kramer <code@tkramer.ch>",
"author_email": "Thomas Kramer <code@tkramer.ch>",
"download_url": null,
"platform": null,
"description": "<!--\nSPDX-FileCopyrightText: 2022 Thomas Kramer\n\nSPDX-License-Identifier: CC-BY-SA-4.0\n-->\n\n# libreda-python\n\n*Work-in-progress*\n\nPython binding for [libreda-db](https://codeberg.org/LibrEDA/libreda-db).\n\n## Install\n\nCreate a Python virtual environment:\n```sh\npython -m venv myPythonEnv\nsource myPythonEnv/bin/activate\n\n# Install maturin (build tool for Rust-based Python packages)\npip install maturin\n```\n\nDownload and install libreda-python:\n\n```sh\n# LibrEDA consists of many Rust libraries. The workspace bundles them together.\ngit clone --recursive https://codeberg.org/LibrEDA/libreda-rs-workspace libreda\ncd libreda/libreda-python\n\n# Install in development mode.\nmaturin develop\n```\n\nRun a Python shell and import `libreda`:\n```sh\npython\n```\n\n```python\nimport libreda as db\n\nchip = db.Chip()\nmy_cell = chip.create_cell(\"A\")\n\n# Write verilog.\nwriter = db.io.VerilogWriter()\nwriter.write_netlist(chip, \"output.v\")\n\n# Read verilog.\nreader = db.io.VerilogReader()\nnetlist = reader.read_netlist(\"output.v\")\n```\n\n",
"bugtrack_url": null,
"license": "AGPL-3.0-or-later",
"summary": "Python binding for the LibrEDA database.",
"version": "0.0.4",
"project_urls": {
"Homepage": "https://libreda.org",
"Source Code": "https://codeberg.org/libreda/libreda-python"
},
"split_keywords": [
"vlsi",
"python"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "614b32102b07db0ac09341d2ffe9a10e78f4c8e2d830498842aead89ed2b7e89",
"md5": "c2c5755821847204178683a0b5d2ce63",
"sha256": "6c694fae2d1d313599b4e3c616d1e267a797ce9496fbd128c07f24f698a08a34"
},
"downloads": -1,
"filename": "libreda_python-0.0.4-cp311-cp311-manylinux_2_34_x86_64.whl",
"has_sig": false,
"md5_digest": "c2c5755821847204178683a0b5d2ce63",
"packagetype": "bdist_wheel",
"python_version": "cp311",
"requires_python": null,
"size": 992154,
"upload_time": "2023-11-21T21:09:40",
"upload_time_iso_8601": "2023-11-21T21:09:40.673090Z",
"url": "https://files.pythonhosted.org/packages/61/4b/32102b07db0ac09341d2ffe9a10e78f4c8e2d830498842aead89ed2b7e89/libreda_python-0.0.4-cp311-cp311-manylinux_2_34_x86_64.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-11-21 21:09:40",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": true,
"codeberg_user": "libreda",
"codeberg_project": "libreda-python",
"lcname": "libreda-python"
}