Skip to main content

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.

https://raw.githubusercontent.com/bogdanvuk/bdp/master/doc/source/images/compile_process.png

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.

https://raw.githubusercontent.com/bogdanvuk/bdp/master/doc/source/images/uml.png

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

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

bdp-0.2.1.tar.gz (29.9 kB view details)

Uploaded Source

Built Distribution

bdp-0.2.1-py3-none-any.whl (26.3 kB view details)

Uploaded Python 3

File details

Details for the file bdp-0.2.1.tar.gz.

File metadata

  • Download URL: bdp-0.2.1.tar.gz
  • Upload date:
  • Size: 29.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.6

File hashes

Hashes for bdp-0.2.1.tar.gz
Algorithm Hash digest
SHA256 d27fc2ce48b6c56f5ad13bab260128daa3f6438e4378acf05925c77b51755b75
MD5 d72ec93c697993546a5da4ba74d6a7ee
BLAKE2b-256 9cd47072a9689e2f338e0b4fa6ec17241091a21e51017463184cb120f7f6b5d8

See more details on using hashes here.

File details

Details for the file bdp-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: bdp-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 26.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.6

File hashes

Hashes for bdp-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 75492f67401a558e4bc06bd23d9609833278f282a67c453955338018758ae0bd
MD5 b3ccb0a31c7e51d4ae0620df044ad529
BLAKE2b-256 a280f34d0ea3eaa3bdb6e3f94b1abc529d9c93d3547ec4495e4e955bb422c800

See more details on using hashes here.

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