Skip to main content

A wrapper around WireViz for bringing it to the web. Easily document cables and wiring harnesses.

Project description

https://github.com/daq-tools/wireviz-web/workflows/Tests/badge.svg https://codecov.io/gh/daq-tools/wireviz-web/branch/main/graph/badge.svg https://img.shields.io/pypi/v/wireviz-web.svg https://pepy.tech/badge/wireviz-web/month https://img.shields.io/pypi/pyversions/wireviz-web.svg https://img.shields.io/pypi/status/wireviz-web.svg https://img.shields.io/github/license/daq-tools/wireviz-web

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.

Setup

Install prerequisites:

{apt,brew,dnf,yum,zypper} install python3 graphviz

Install package:

pip install wireviz-web

Usage

Run server:

wireviz-web

Invoke requests:

# 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.

Project information

Contributions

Every kind of contribution, feedback, or patch, is much welcome. Create an issue or submit a patch if you think we should include a new feature, or to report or fix a bug.

In order to follow the general development discussion, please see Bringing WireViz to the Web.

Development

In order to setup a development environment on your workstation, please head over to the development sandbox documentation. When you see the software tests succeed, you should be ready to start hacking.

Resources

License

The project is licensed under the terms of the GNU AGPL license.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wireviz_web-0.4.2.tar.gz (19.7 kB view details)

Uploaded Source

Built Distribution

wireviz_web-0.4.2-py3-none-any.whl (21.8 kB view details)

Uploaded Python 3

File details

Details for the file wireviz_web-0.4.2.tar.gz.

File metadata

  • Download URL: wireviz_web-0.4.2.tar.gz
  • Upload date:
  • Size: 19.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for wireviz_web-0.4.2.tar.gz
Algorithm Hash digest
SHA256 2827d78e0e931192dbdf278cca94d4b9be5b3095eaec94dcb6b03fa2c8290d75
MD5 c53a77bd1d42afd9cbe7f50397b34093
BLAKE2b-256 95c7fe32a4c85a23434248c8d10e778def06bca2ddde2f024ed249f6867f899c

See more details on using hashes here.

File details

Details for the file wireviz_web-0.4.2-py3-none-any.whl.

File metadata

  • Download URL: wireviz_web-0.4.2-py3-none-any.whl
  • Upload date:
  • Size: 21.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for wireviz_web-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ee8d662f5c2e4452f41123c57bb57bb328d39a0da99895289c056d711c0e4a8a
MD5 1455d98b4622fcd9a0a4e1c6d87b6685
BLAKE2b-256 5268884e6dd9c3c679244575e4e5b92bcde3473d22013c58889ad606a7dac897

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page