
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
pymermaider
is a tool written in Rust designed to generate mermaid.js class diagrams from Python code. By analyzing Python code, pymermaider
automatically generates mermaid.js-compatible diagrams that represent the class structures, including classes, methods, attributes, and their relationships. This tool aims to simplify the documentation process for Python projects, making it easier to visualize class hierarchies and relationships.
pymermaider is available on PYPI:
# With pip.
pip install pymermaider
# With pipx.
pipx install pymermaider
pymermaider [OPTIONS] <PATH>
<PATH>
The path to a file or directory to process.-m, --multiple-files
When processing a directory, this option will generate an individual Mermaid file for each file within the directory.
-o, --output-dir <OUTPUT>
Specify the output directory for the generated Mermaid files. Defaults to ./output
if not provided.
-h, --help
Display help information for the command.
-V, --version
Show the current version of pymermaider
.
--exclude <FILE_PATTERN>
: Excludes specific files and/or directories from being analyzed.--extend-exclude <FILE_PATTERN>
: Similar to --exclude
, but adds additional files and directories to exclude on top of those already specified.--extend-exclude
:pymermaider /path/to/dir --extend-exclude "**/tests/*,**/docs/*"
This command will exclude any folders within the subdirectories of /path/to/dir
that are named tests
or docs
.
-m
flag. You can break class diagrams apart more easily into multiple renderings.Given a Python file example.py
with the following content:
class Animal:
def __init__(self, name: str) -> None:
self.name = name
class Dog(Animal):
def bark(self) -> str:
return "Woof!"
Running pymermaider on this file will provide:
classDiagram
class Animal {
- __init__(self, name) None
}
class Dog {
+ bark(self) str
}
Dog --|> Animal
Contributions are more than welcome, just make a PR and we'll go from there!
This project is licensed under the MIT license. Please see the LICENSE file for more details.
FAQs
Mermaid diagram generator for Python code.
We found that pymermaider 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.