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.
Description
Briefly describe your project here. Explain what it does and what makes it special.
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: Mermaid = 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)
erdiagram-link(Link)
entity(Entity)
flow-link(Link)
node(Node)
requiremnt(Requiremnt)
element(Element)
mer --> flow
mer --> clas
mer --> gra
mer --> erDigram
mer --> pie
mer --> reqDiagram
flow --> node & flow-link
erDigram --> entity & erdiagram-link
reqDiagram --> requiremnt & element
Technologies Used
- Python3
- Poetry
To contribute to mermaid-py
If you'd like to contribute to this open source project folow this steps:
- Forke the repo and then clone it.
- Navigate to the project directory:
cd mermaid-py
. - create a local enviroment
python3 -m venv env
. - activate the env
source env/bin/activate
. - install the dependecies
poetry install
. - happy coding :) .
List of Diagrames
- FlowChart
- Sequence Diagram
- Class Diagram
- State Diagram
- Entity Relationship Diagram
- User Journey
- Gantt
- Pie Chart
- Quadrant Chart
- Requirement Diagram
- Gitgraph (Git) Diagram 🔥
- C4 Diagram 🦺⚠️
- Mindmaps 🔥
- Timeline 🔥
- Zenuml 🔥
- Sankey 🔥
- XYChart 🔥
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
Release history Release notifications | RSS feed
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.3.tar.gz
(8.4 kB
view hashes)
Built Distribution
mermaid_py-0.2.3-py3-none-any.whl
(11.6 kB
view hashes)
Close
Hashes for mermaid_py-0.2.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 58ca5627c769c8c7bbe68baed920ec9cd5f4211a8bb8b132f64894ee40e1ef68 |
|
MD5 | f7b04f9e0184156a517340821af93c9c |
|
BLAKE2b-256 | c08057438149017a1f1976ff89e9ef53f110ce6f93a5220d77be11dede609c2f |