Skip to main content

syrenka is mermaid.js markdown generator

Project description

syrenka

syrenka is mermaid.js markdown generator

Description

The aim of this project is to provide easy to use classes for generating mermaid charts and diagrams.

Installation

pip install syrenka

Example

Here are current classes with names starting with "Mermaid" in syrenka module:

---
title: syrenka class diagram
---
classDiagram
    class MermaidClass{
        +to_code(self)
    }
    class MermaidClassDiagram{
        +add_class(self, cls)
        +add_classes(self, classes)
        +to_code(self)
    }
    class MermaidFlowchart{
        +to_code(self)
    }
    class MermaidFlowchartDirection{
    }
    class MermaidGeneratorBase{
        +to_code(self)
    }

So how do we get it? This is a code snippet that does it:

import syrenka

class_diagram  = syrenka.MermaidClassDiagram("syrenka class diagram")
class_diagram.add_classes(syrenka.generate_class_list_from_module(module_name="syrenka", starts_with="Mermaid")

for line in class_diagram.to_code():
    print(line)

and the output:

---
title: syrenka class diagram
---
classDiagram
    class MermaidClass{
        -cls
        -indent
        -skip_underscores
        +__init__(self, cls, skip_underscores)
        +to_code(self)
    }
    class MermaidClassDiagram{
        -title
        -classes
        +__init__(self, title)
        +add_class(self, cls)
        +add_classes(self, classes)
        +to_code(self)
    }
    class MermaidFlowchart{
        -title
        -direction
        +__init__(self, title, direction)
        +to_code(self)
    }
    class MermaidFlowchartDirection{
    }
    class MermaidGeneratorBase{
        +__init__(self)
        +to_code(self)
    }

ready to use mermaid markdown

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

syrenka-0.1.1.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

syrenka-0.1.1-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file syrenka-0.1.1.tar.gz.

File metadata

  • Download URL: syrenka-0.1.1.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for syrenka-0.1.1.tar.gz
Algorithm Hash digest
SHA256 2480c60ad6ba17676f1073f8b3b051035d3d0423e93a7d75e6bae59e45f8f363
MD5 3ca384071c2b3e41382e04dc8c285510
BLAKE2b-256 b148914d0dc75948eccbbe9c071b9c061d8207e5621b3b056d4a7e8b6588e143

See more details on using hashes here.

Provenance

The following attestation bundles were made for syrenka-0.1.1.tar.gz:

Publisher: python-publish.yml on bartlomiejcieszkowski/syrenka

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file syrenka-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: syrenka-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 3.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for syrenka-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8ea975253b536a2e87410bebb8db6f4ae486959ab14dc48c3a8e9b5af22cc96c
MD5 bfec7d73a9f6c8d26c6d154160f87d80
BLAKE2b-256 11784f64832cc11ef65123faae7884b4ad756a87d2abf31d0fc8f6127f03eefe

See more details on using hashes here.

Provenance

The following attestation bundles were made for syrenka-0.1.1-py3-none-any.whl:

Publisher: python-publish.yml on bartlomiejcieszkowski/syrenka

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page