Skip to main content

A simple interface for the the famous lib mermaid-js to create diagrams.

Project description

Mermaid-py

this package works as an interface for the famous mermaid-js library that uses scripts to create diagrams.

Code Coverage GitHub LICENSE Contributors

Description

mermaid-py is a dynamic Python library designed to serve as a seamless interface for the renowned Mermaid library. Built upon the powerful capabilities of Python, mermaid-py empowers developers and data enthusiasts to effortlessly create stunning diagrams, flowcharts, and visualizations directly within their Python environments.

Examples

first install mermaid-py by pip install mermaid-py.

import mermaid as md
from mermaid.graph import Graph

graph: Graph = Graph('first-graph',"""
graph TD;
    mer(Mermaid)
    flow(FlowChart);
    clas(ClassDiagram)
    gra(Graph)
    erDigram(ERDiagram)
    erdiagram-link(Link)
    entity(Entity)
    flow-link(Link)
    node(Node)
    mer --> flow
    mer --> clas
    mer --> gra
    mer --> erDigram
    flow --> node & flow-link
    erDigram --> entity & erdiagram-link
""")
graphe: md.Mermaid = md.Mermaid(graph)
graphe # !! note this work just in notbooke that render html.

the result will be like this

graph TD;
    mer(Mermaid)
    flow(FlowChart);
    clas(ClassDiagram)
    gra(Graph)
    erDigram(ERDiagram)
    pie(PieDiagram)
    reqDiagram(RequiremntDiagram)
    userj(UserJourney)
    erdiagram-link(Link)
    entity(Entity)
    flow-link(Link)
    node(Node)
    requiremnt(Requiremnt)
    element(Element)
    actor(Actor)
    section(Section)
    task(Task)
    mer --> flow & clas & gra & erDigram & pie & reqDiagram & userj
    flow --> node & flow-link
    erDigram --> entity & erdiagram-link
    reqDiagram --> requiremnt & element
    userj --> actor & section & task

Technologies Used

  • Python3
  • Poetry

To contribute to mermaid-py

If you'd like to contribute to this open source project folow this steps:

  1. Forke the repo and then clone it.
  2. Navigate to the project directory: cd mermaid-py.
  3. create a local enviroment python3 -m venv env.
  4. activate the env source env/bin/activate.
  5. install the dependecies poetry install.
  6. happy coding :) .

List of Diagrames

License

This project is licensed under the MIT License.

Contact

If you have any questions or want to get in touch, you can reach out to me at rachidouhammou21@gmail.com.

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

mermaid_py-0.2.8.tar.gz (18.0 kB view details)

Uploaded Source

Built Distribution

mermaid_py-0.2.8-py3-none-any.whl (26.6 kB view details)

Uploaded Python 3

File details

Details for the file mermaid_py-0.2.8.tar.gz.

File metadata

  • Download URL: mermaid_py-0.2.8.tar.gz
  • Upload date:
  • Size: 18.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.10.12 Linux/6.5.0-1016-azure

File hashes

Hashes for mermaid_py-0.2.8.tar.gz
Algorithm Hash digest
SHA256 64c11e20d6d2a478b5ad4d357583ffe67d58349a6414f248e432857aa72df324
MD5 be62604ca17e9e9cb1341c2844799fc2
BLAKE2b-256 fd8c4959438b275d25f1b015284dbf66eeedeb4d1bd73e65d42d1c1a10d6ef8a

See more details on using hashes here.

File details

Details for the file mermaid_py-0.2.8-py3-none-any.whl.

File metadata

  • Download URL: mermaid_py-0.2.8-py3-none-any.whl
  • Upload date:
  • Size: 26.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.10.12 Linux/6.5.0-1016-azure

File hashes

Hashes for mermaid_py-0.2.8-py3-none-any.whl
Algorithm Hash digest
SHA256 272ef7b26f59a1fa55c6e87eb7c00f501280e094344e562f7c9ca8c7cb228d6d
MD5 d51927f71d2415cbc5f8d1d92b78b10b
BLAKE2b-256 5f7e0e3e6e544bb933a0d89aff2be4fe19fe3bd8d86ffe9f6ec592e456c6c0d7

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