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://img.shields.io/github/v/tag/daq-tools/wireviz-web.svg https://img.shields.io/pypi/dm/wireviz-web.svg https://img.shields.io/pypi/pyversions/wireviz-web.svg https://img.shields.io/badge/code%20style-black-000000.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.

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

wireviz-web-0.3.1.tar.gz (21.4 kB view details)

Uploaded Source

Built Distribution

wireviz_web-0.3.1-py3-none-any.whl (33.2 kB view details)

Uploaded Python 3

File details

Details for the file wireviz-web-0.3.1.tar.gz.

File metadata

  • Download URL: wireviz-web-0.3.1.tar.gz
  • Upload date:
  • Size: 21.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.11 CPython/3.9.7 Darwin/19.6.0

File hashes

Hashes for wireviz-web-0.3.1.tar.gz
Algorithm Hash digest
SHA256 ab79edd8887ae7fa516517de4fdba34f154cc50b4a1771ddaf6f32cc2045d645
MD5 8e795f864840255072f87f10e35e7f7b
BLAKE2b-256 26dbad06f61b6db6d4e1a1fd636674c35966047e417e4debd8ac335e11be9b6c

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: wireviz_web-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 33.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.11 CPython/3.9.7 Darwin/19.6.0

File hashes

Hashes for wireviz_web-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4d8e5c068833c8ef6cf527c6a35a3f4b09e86bf0dbd83906cd4f03f30779b6f0
MD5 abd0486e38462831df7bdc77149772c2
BLAKE2b-256 bcec79ce585eec6d91faa3148ccd19fde980e4936b9e32d58503665592b3f6fa

See more details on using hashes here.

Provenance

Supported by

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