Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Python Interface for the Popular mermaid-js Library, Simplified for Diagram Creation.
this package works as an interface for the famous mermaid-js library that uses scripts to create diagrams.
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.
first install the package using pip:
pip install mermaid-py
Mermaid
and Graph
classes:import mermaid as md
from mermaid.graph import Graph
sequence = Graph('Sequence-diagram',"""
stateDiagram-v2
[*] --> Still
Still --> [*]
Still --> Moving
Moving --> Still
Moving --> Crash
Crash --> [*]
""")
render = md.Mermaid(sequence)
render # !! note this only works in the notebook that rendered the html.
mermaidjs
magic function in a notebook first import mermaid as md
:%%mermaidjs # with --img flag in case your notebook doesn't render HTML
flowchart LR
A-->B
B-->C
FlowChart
etc ...from mermaid import *
from mermaid.flowchart import *
diagram = Mermaid(Flowchart(...))
diagram
By default, the library uses the mermaid.ink service github for generating diagrams. The service can be run locally using docker, following instructions here.
The MERMAID_INK_SERVER
environment variable can be used to specify the server to use, for example.
This project is licensed under the MIT License.
If you have any questions or want to get in touch, you can reach out to me at rachidouhammou21@gmail.com.
FAQs
Python Interface for the Popular mermaid-js Library, Simplified for Diagram Creation.
We found that mermaid-py demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.