A wrapper around WireViz for bringing it to the web. Easily document cables and wiring harnesses.
Project description
About
WireViz-Web is a wrapper around the excellent WireViz by Daniel Rojas for bringing it to the web.
Originally, it has been conceived within a WireViz fork by Jürgen Key. For compatibility with PlantUML, it includes a PlantUML Text Encoding format decoder by Dyno Fu and Rudi Yardley.
Thanks!
Details
WireViz
WireViz is a tool for easily documenting cables, wiring harnesses and connector pinouts. It takes plain text, YAML-formatted files as input and produces beautiful graphical output (SVG, PNG, …) thanks to GraphViz. It handles automatic BOM (Bill of Materials) creation and has a lot of extra features.
WireViz-Web
WireViz-Web wraps WireViz with a REST API using Flask. It also provides specific rendering endpoints for PlantUML.
Synopsis
Setup:
pip install wireviz-web
Invoke:
# Run server. wireviz-web # Acquire WireViz YAML file. wget https://raw.githubusercontent.com/daq-tools/wireviz-web/main/tests/demo01.yaml # Render images. http --form http://localhost:3005/render yml_file@demo01.yaml Accept:image/svg+xml http --form http://localhost:3005/render yml_file@demo01.yaml Accept:image/png # Render HTML page with SVG image and BOM table. http --form http://localhost:3005/render yml_file@demo01.yaml Accept:text/html # Render BOM in TSV format. http --form http://localhost:3005/render yml_file@demo01.yaml Accept:text/plain # Render BOM in JSON format. http --form http://localhost:3005/render yml_file@demo01.yaml Accept:application/json # Render a PlantUML request. http http://localhost:3005/plantuml/svg/SyfFKj2rKt3CoKnELR1Io4ZDoSa700== http http://localhost:3005/plantuml/png/SyfFKj2rKt3CoKnELR1Io4ZDoSa700==
For visiting the Swagger OpenAPI spec, go to http://localhost:3005/doc.
Tests
Invoke tests, optionally with coverage report:
# Setup sandbox git clone https://github.com/daq-tools/wireviz-web cd wireviz-web poetry install # Run tests poetry run poe test # Run tests, with coverage poetry run poe coverage
Development
As this project is still in its infancy, we humbly ask for support from the community. Look around, give it a test drive and submit patches. There are always things to do.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for wireviz_web-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 68e0a837bab0c435eedb2c69a31950522b6a69642ff906170083ba671e32a851 |
|
MD5 | 9904e7c496d7491f2479348bf8449b83 |
|
BLAKE2b-256 | 14850b82a6bd355a47caf5f777c9553d3b848981e0c77a6b71e104b22c9b1ba9 |