Skip to main content
Warning: You are using the test version of PyPI. This is a pre-production deployment of Warehouse. Changes made here affect the production instance of TestPyPI (testpypi.python.org).
Help us improve Python packaging - Donate today!

Block Diagrams in Python

Project Description

Welcome to BDP

BDP (Block Diagrams in Python) aims to become a Python fronted for TikZ when it comes to drawing block diagrams in order to facilitate the process. BDP wraps the TikZ statements into the Python objects so that users can describe diagrams in pure Python. However, inserting raw TikZ in BDP is also possible. Figure below shows an BDP example image which represents the BDP compilation process.

Figure can be rendered with the compile_process.py BDP diagram. It can be rendered into the PNG with BDP via command line:

# bdp compile_process.py -p

For a complete list of command line options please take a look at command_line chapter of the documentation.

Why BDP?

BDP brings following benefits:

  • Diagram description in Python which should render it more readable
  • Step-by-step debugging of the diagram description
  • Use the tools and design environments available for Python development (debugging, code completion, refactoring, documentation utilities…)
  • Use vast Python library of packages

BDP features

BDP package comprises:

  • Python classes that wrap the Tikz statements
  • Class for rendering PDF and PNG images from the Python description
  • Shell entry point for rendering BDP images from command line
  • Sphinx extensions for embedding BDP images into the Sphinx documents

Image below is a more complex example, which shows how power of Python programming can be used to generate diagrams with BDP. Image shows an UML-like diagram of few major BDP templates.

Figure can be rendered with the uml.py BDP diagram.

Where to start?

Installation

BDP package currently supports only Python 3. Following are alternative ways to install BDP.

Install BDP using pip:

pip3 install bdp

Install BDP using easy_install:

easy_install3 bdp

Install BDP from source:

python3 setup.py install

BDP requires TeX Live, which could be installed on a Debian or a Debian-derived systems, with:

# sudo apt-get install texlive

For converting PDF to PNG, pdftoppm, pnmcrop and pnmtopng are needed, which could be installed on a Debian or a Debian-derived systems, with:

# sudo apt-get install poppler-utils
# sudo apt-get install netpbm

Read the documentation

Read the BDP documentation

Checkout the examples

BDP images used in documentation are located in the images repository documentation folder.

Get involved

Pull your copy from github repository

Release History

Release History

This version
History Node

0.2

History Node

0.1.3dev-20150608

History Node

0.1.2dev-20150608

History Node

0.1.1dev-20150608

History Node

0.1dev-20150608

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
bdp-0.2.tar.gz (27.3 kB) Copy SHA256 Checksum SHA256 Source Jun 12, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting