📜  kroki - hello.dot - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:46.776000             🧑  作者: Mango

代码示例1
# Kroki provides an HTTP API to create diagrams from textual descriptions. Kroki handles both GET and POST requests. When using GET requests, your diagram must be encoded in the URL using a deflate + base64 algorithm. But don't worry, if you're not familiar with deflate or base64 (or if you don't want to use them), you can also send your diagram as plain text using POST requests (see below).
#
# Let's take an example with a GraphViz "Hello World":
#
#
cat hello.dot | python -c "import sys; import base64; import zlib; print(base64.urlsafe_b64encode(zlib.compress(sys.stdin.read(), 9)))"