Skip to main content

Writing dot language and render in jupyter.

Project description

Dot Kernel

The dot kernel for jupyter!

There is an awesome dot language tutorial in Chinese: learn-dot.

demo.jpeg

Install

You should have graphviz first.

  • Install by brew: brew install graphviz.
  • or sudo apt-get install graphviz for ubuntu

Then,

pip install dot_kernel

Add kernel to your jupyter:

install-dot-kernel

ALL DONE! 🎉🎉🎉

Run using:

jupyter notebook

Select new -> dot

new_dot.png

and try run this:

 // The graph name and the semicolons are optional
 graph graphname {
     a -- b -- c;
     b -- d;
 }

You will see:

first_try.png

Running in Docker

A container based on jupyter/datascience named garo/jupyter-dot is available on Docker Hub. If you have docker you can run it as you would any other jupyter container without having to install anything. A quick example: docker run -d -rm -p 8888:8888 garo/jupyter-dot

TODO

  1. update this.
  2. add more render tools not just dot
  3. add more filetype support not just png
  4. auto indent

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

dot_kernel-0.1.9.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dot_kernel-0.1.9-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file dot_kernel-0.1.9.tar.gz.

File metadata

  • Download URL: dot_kernel-0.1.9.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for dot_kernel-0.1.9.tar.gz
Algorithm Hash digest
SHA256 fb988481c96aaad7942d5dafd9018181323f332fc7a2aebc48cfac4354d9abe1
MD5 017fd61f67f339de538e61a5e1872ea6
BLAKE2b-256 e4ea1494cf7a1f2e25bd320fbb8c279996c894926bb610e4a8320306cad9523a

See more details on using hashes here.

File details

Details for the file dot_kernel-0.1.9-py3-none-any.whl.

File metadata

  • Download URL: dot_kernel-0.1.9-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for dot_kernel-0.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 9cf3ca5976daa795b687d1c67a8efdb4cd323821ea05e8689504bd0f75b6fcc9
MD5 23ffd02dcae26f9077d5f143923eeb2f
BLAKE2b-256 b3548f8bacc9fea9f9457efc42edf4c1720ff817f468788051e180584a3a8c68

See more details on using hashes here.

Supported by

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