Name | bisos.graphviz JSON |
Version |
0.23
JSON |
| download |
home_page | None |
Summary | bisos.graphviz: Seeded-PyCS Graphviz |
upload_time | 2025-02-17 01:24:25 |
maintainer | Mohsen Banan |
docs_url | None |
author | Mohsen Banan |
requires_python | None |
license | AGPL |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
====================================
bisos.graphviz: Seeded-PyCS Graphviz
====================================
.. contents::
:depth: 3
..
Overview
========
bisos.graphviz (Seeded-PyCS Graphviz) is Python graphviz wrapped into
BISOS Command-Services and Seed Machinaries.
bisos.graphviz is a python package that uses the PyCS-Framework
(`bisos.PyCS <https://github.com/bisos-pip/pycs>`__) for processing
graphviz specifications. It is a layer on top of Python Graphviz —
https://github.com/xflr6/graphviz — which provides a python interface to
the DOT language of the Graphviz graph drawing software. It is a
BISOS-Capability and a Standalone-BISOS-Package.
Package Documentation At Github
===============================
The information below is a subset of the full of documentation for this
bisos-pip package. More complete documentation is available at:
https://github.com/bisos-pip/graphviz-cs
Abstract – Concepts and Terminology
===================================
Referring to the figure below, inputs are on the top and outputs are at
the bottom.
Layerings
---------
The ellipses represent processing layers.
- The **graphviz.org layer** takes DOT (graph description language)
input and produces graphs is a variety of formats. Graphviz is open
source graph visualization software hosted at
https://www.graphviz.org/.
- The **Python Graphviz layer** builds on the graphviz.org layer and
provides an interface to dot facilities in python. Python Graphviz
software is hosted at https://github.com/xflr6/graphviz.
- The **Seeded-PyCS Graphviz layer** Seeded-PyCS Graphviz layer
enhances the Python Graphviz layer by providing the ability to
include multiple graphs in one file (packaging) and by providing the
ability to produce any desired output format from the command-line.
Seeded-PyCS Graphviz uses
`bisos.PyCS <https://github.com/bisos-pip/pycs>`__. Seeded-PyCS
Graphviz software is hosted at
https://github.com/bisos-pip/graphviz-cs.
Named Graphs Input Files – package-graphviz.cs
----------------------------------------------
Input files containing graph specifications (the top layer in the figure
below) can reside anywhere in the file system and are typically named
package-graphviz.cs where package conveys a name for a grouping of graph
specifications. Execution of input files (say
`file:./examples/exmpl-graphviz.cs <./examples/exmpl-graphviz.cs>`__)
produces output in any or all of the output formats. The output format
can be any of pdf, svg, png, jpeg or gv format. Output in various
formats is shown as the bottom layer of the figure below.
Input files are structured as **Named Graphs**. Named Graphs have two
elements:
#. **Graph specification function**. A python named function that takes
no arguments and returns a type **graphviz.Digraph** object.
#. **Name**. The name is used to produce output files and is commonly
the name of function (1) as well.
The list of Named Graphs forms the **namedGraphsList** which becomes an
argument to the **graphvizSeed.setup** function.
The `file:./bin/exmpl-graphviz.cs <./bin/exmpl-graphviz.cs>`__ in the
bin directory can be used as a starting point and example. The examples
directory contains many other examples. The images directory contains
the input
(`file:./images/readme-graphviz.cs <./images/readme-graphviz.cs>`__)
that produced the figure below.
Concept of Seeded-PyCS Input Files
----------------------------------
PyCS (`bisos.PyCS <https://github.com/bisos-pip/pycs>`__) provides a
framework for creating python mapping functions to the command line
(similar to click).
Often it make good sense to package the input with its processing
capabilities in one place. We do this using the Seeded-PyCS design
pattern. Seeded-PyCS-Graphviz is such an example.
.. _table-of-contents:
Table of Contents TOC
=====================
- `Overview <#overview>`__
- `Package Documentation At
Github <#package-documentation-at-github>`__
- `Abstract – Concepts and
Terminology <#abstract----concepts-and-terminology>`__
- `Layerings <#layerings>`__
- `Named Graphs Input Files –
package-graphviz.cs <#named-graphs-input-files----package-graphvizcs>`__
- `Concept of Seeded-PyCS Input
Files <#concept-of-seeded-pycs-input-files>`__
- `A Hello World Example —
hello-graphviz.cs <#a-hello-world-example-----hello-graphvizcs>`__
- `Installation <#installation>`__
- `Installation With pip <#installation-with-pip>`__
- `Installation With pipx <#installation-with-pipx>`__
- `Part of BISOS and ByStar — ByStar Internet Services Operating
System <#part-of-bisos-and-bystar-----bystar-internet-services-operating-system>`__
- `bisos.graphviz as a Standalone Piece of
BISOS <#bisosgraphviz-as-a-standalone-piece-of-bisos>`__
- `Documentation and Blee-Panels <#documentation-and-blee-panels>`__
- `bisos.graphviz Blee-Panels <#bisosgraphviz-blee-panels>`__
- `Support <#support>`__
A Hello World Example — hello-graphviz.cs
=========================================
Below we shall walk through
`file:./examples/hello-graphviz.cs <./examples/hello-graphviz.cs>`__
which produces This is the equivalent of
https://github.com/xflr6/graphviz/blob/master/examples/hello.py which
produces https://graphviz.org/Gallery/directed/hello.html.
`file:./examples/hello-graphviz.cs <./examples/hello-graphviz.cs>`__ is
written in Python COMEEGA, which is Python augmented by Emacs org-mode.
In that file everything inside of +BEGIN +END is a dynamic block and
everything that is in +begin\ :sub:`org` +end\ :sub:`org` is in org-mode
syntax. For more information about COMEEGA (Collaborative Org-Mode
Enhanced Emacs Generalized Authorship) see
https://github.com/bx-blee/comeega. PyCS and BISOS are developed in
COMEEGA.
The code fragment below is in pure Python.
.. code:: python
import graphviz
from bisos.graphviz import graphvizSeed
ng = graphvizSeed.namedGraph # just an abbreviation
def hello() -> graphviz.Digraph:
g = graphviz.Digraph('G',)
g.edge('Hello', 'World')
return g
namedGraphsList = [
ng("hello", func=hello),
]
graphvizSeed.setup(
namedGraphsList=namedGraphsList,
)
The **b:py3:cs:seed/withWhich :seedName "seedGraphviz.cs"** dynamic
block then results in the execution of the seed:
.. code:: python
__file__ = os.path.abspath(seedPath)
with open(__file__) as f:
exec(compile(f.read(), __file__, 'exec'))
If you wanted to include multiple graphs in one input file, you would
just add them the **namedGraphsList**.
You can then just run:
.. code:: bash
hello-graphviz.cs
Which produces a menu for production of desired formats.
or you can run:
.. code:: bash
hello-graphviz.cs --format="all" -i ngProcess all
Which produces output in all formats.
Installation
============
The sources for the bisos.graphviz pip package is maintained at:
https://github.com/bisos-pip/graphviz.
The bisos.graphviz pip package is available at PYPI as
https://pypi.org/project/bisos.graphviz
You can install bisos.graphviz with pip or pipx.
Installation With pip
---------------------
If you need access to bisos.graphviz as a python module, you can install
it with pip:
.. code:: bash
pip install bisos.graphviz
Installation With pipx
----------------------
If you only need access to bisos.graphviz as a command on command-line,
you can install it with pipx:
.. code:: bash
pipx install bisos.graphviz
The following commands are made available:
- seedGraphviz.cs
- exmpl-graphviz.cs
Part of BISOS and ByStar — ByStar Internet Services Operating System
====================================================================
| Layered on top of Debian, **BISOS**: (By\* Internet Services Operating
System) is a unified and universal framework for developing both
internet services and software-service continuums that use internet
services. See `Bootstrapping ByStar, BISOS and
Blee <https://github.com/bxGenesis/start>`__ for information about
getting started with BISOS.
| **BISOS** is a foundation for **The Libre-Halaal ByStar Digital
Ecosystem** which is described as a cure for losses of autonomy and
privacy in a book titled: `Nature of
Polyexistentials <https://github.com/bxplpc/120033>`__
*bisos.graphviz* is part of BISOS.
bisos.graphviz as a Standalone Piece of BISOS
=============================================
bisos.graphviz is a standalone piece of BISOS. It can be used as a
self-contained Python package separate from BISOS. Follow the
installation and usage instructions below for your own use.
Documentation and Blee-Panels
=============================
bisos.graphviz is part of ByStar Digital Ecosystem
http://www.by-star.net.
This module's primary documentation is in the form of Blee-Panels.
Additional information is also available in:
http://www.by-star.net/PLPC/180047
bisos.graphviz Blee-Panels
--------------------------
bisos.graphviz Blee-Panels are in ./panels directory. From within Blee
and BISOS these panels are accessible under the Blee "Panels" menu.
Support
=======
| For support, criticism, comments and questions; please contact the
author/maintainer
| `Mohsen Banan <http://mohsen.1.banan.byname.net>`__ at:
http://mohsen.1.banan.byname.net/contact
Raw data
{
"_id": null,
"home_page": null,
"name": "bisos.graphviz",
"maintainer": "Mohsen Banan",
"docs_url": null,
"requires_python": null,
"maintainer_email": "libre@mohsen.1.banan.byname.net",
"keywords": null,
"author": "Mohsen Banan",
"author_email": "libre@mohsen.1.banan.byname.net",
"download_url": "https://files.pythonhosted.org/packages/41/6a/697851a3485bec07c63cc97f03b1cf335ed94670c66a639d7f46c04ae220/bisos_graphviz-0.23.tar.gz",
"platform": null,
"description": "====================================\nbisos.graphviz: Seeded-PyCS Graphviz\n====================================\n\n.. contents::\n :depth: 3\n..\n\nOverview\n========\n\nbisos.graphviz (Seeded-PyCS Graphviz) is Python graphviz wrapped into\nBISOS Command-Services and Seed Machinaries.\n\nbisos.graphviz is a python package that uses the PyCS-Framework\n(`bisos.PyCS <https://github.com/bisos-pip/pycs>`__) for processing\ngraphviz specifications. It is a layer on top of Python Graphviz \u2014\nhttps://github.com/xflr6/graphviz \u2014 which provides a python interface to\nthe DOT language of the Graphviz graph drawing software. It is a\nBISOS-Capability and a Standalone-BISOS-Package.\n\nPackage Documentation At Github\n===============================\n\nThe information below is a subset of the full of documentation for this\nbisos-pip package. More complete documentation is available at:\nhttps://github.com/bisos-pip/graphviz-cs\n\nAbstract \u2013 Concepts and Terminology\n===================================\n\nReferring to the figure below, inputs are on the top and outputs are at\nthe bottom.\n\nLayerings\n---------\n\nThe ellipses represent processing layers.\n\n- The **graphviz.org layer** takes DOT (graph description language)\n input and produces graphs is a variety of formats. Graphviz is open\n source graph visualization software hosted at\n https://www.graphviz.org/.\n\n- The **Python Graphviz layer** builds on the graphviz.org layer and\n provides an interface to dot facilities in python. Python Graphviz\n software is hosted at https://github.com/xflr6/graphviz.\n\n- The **Seeded-PyCS Graphviz layer** Seeded-PyCS Graphviz layer\n enhances the Python Graphviz layer by providing the ability to\n include multiple graphs in one file (packaging) and by providing the\n ability to produce any desired output format from the command-line.\n Seeded-PyCS Graphviz uses\n `bisos.PyCS <https://github.com/bisos-pip/pycs>`__. Seeded-PyCS\n Graphviz software is hosted at\n https://github.com/bisos-pip/graphviz-cs.\n\nNamed Graphs Input Files \u2013 package-graphviz.cs\n----------------------------------------------\n\nInput files containing graph specifications (the top layer in the figure\nbelow) can reside anywhere in the file system and are typically named\npackage-graphviz.cs where package conveys a name for a grouping of graph\nspecifications. Execution of input files (say\n`file:./examples/exmpl-graphviz.cs <./examples/exmpl-graphviz.cs>`__)\nproduces output in any or all of the output formats. The output format\ncan be any of pdf, svg, png, jpeg or gv format. Output in various\nformats is shown as the bottom layer of the figure below.\n\nInput files are structured as **Named Graphs**. Named Graphs have two\nelements:\n\n#. **Graph specification function**. A python named function that takes\n no arguments and returns a type **graphviz.Digraph** object.\n#. **Name**. The name is used to produce output files and is commonly\n the name of function (1) as well.\n\nThe list of Named Graphs forms the **namedGraphsList** which becomes an\nargument to the **graphvizSeed.setup** function.\n\nThe `file:./bin/exmpl-graphviz.cs <./bin/exmpl-graphviz.cs>`__ in the\nbin directory can be used as a starting point and example. The examples\ndirectory contains many other examples. The images directory contains\nthe input\n(`file:./images/readme-graphviz.cs <./images/readme-graphviz.cs>`__)\nthat produced the figure below.\n\nConcept of Seeded-PyCS Input Files\n----------------------------------\n\nPyCS (`bisos.PyCS <https://github.com/bisos-pip/pycs>`__) provides a\nframework for creating python mapping functions to the command line\n(similar to click).\n\nOften it make good sense to package the input with its processing\ncapabilities in one place. We do this using the Seeded-PyCS design\npattern. Seeded-PyCS-Graphviz is such an example.\n\n.. _table-of-contents:\n\nTable of Contents TOC\n=====================\n\n- `Overview <#overview>`__\n- `Package Documentation At\n Github <#package-documentation-at-github>`__\n- `Abstract \u2013 Concepts and\n Terminology <#abstract----concepts-and-terminology>`__\n\n - `Layerings <#layerings>`__\n - `Named Graphs Input Files \u2013\n package-graphviz.cs <#named-graphs-input-files----package-graphvizcs>`__\n - `Concept of Seeded-PyCS Input\n Files <#concept-of-seeded-pycs-input-files>`__\n\n- `A Hello World Example \u2014\n hello-graphviz.cs <#a-hello-world-example-----hello-graphvizcs>`__\n- `Installation <#installation>`__\n\n - `Installation With pip <#installation-with-pip>`__\n - `Installation With pipx <#installation-with-pipx>`__\n\n- `Part of BISOS and ByStar \u2014 ByStar Internet Services Operating\n System <#part-of-bisos-and-bystar-----bystar-internet-services-operating-system>`__\n- `bisos.graphviz as a Standalone Piece of\n BISOS <#bisosgraphviz-as-a-standalone-piece-of-bisos>`__\n- `Documentation and Blee-Panels <#documentation-and-blee-panels>`__\n\n - `bisos.graphviz Blee-Panels <#bisosgraphviz-blee-panels>`__\n\n- `Support <#support>`__\n\nA Hello World Example \u2014 hello-graphviz.cs\n=========================================\n\nBelow we shall walk through\n`file:./examples/hello-graphviz.cs <./examples/hello-graphviz.cs>`__\nwhich produces This is the equivalent of\nhttps://github.com/xflr6/graphviz/blob/master/examples/hello.py which\nproduces https://graphviz.org/Gallery/directed/hello.html.\n\n`file:./examples/hello-graphviz.cs <./examples/hello-graphviz.cs>`__ is\nwritten in Python COMEEGA, which is Python augmented by Emacs org-mode.\nIn that file everything inside of +BEGIN +END is a dynamic block and\neverything that is in +begin\\ :sub:`org` +end\\ :sub:`org` is in org-mode\nsyntax. For more information about COMEEGA (Collaborative Org-Mode\nEnhanced Emacs Generalized Authorship) see\nhttps://github.com/bx-blee/comeega. PyCS and BISOS are developed in\nCOMEEGA.\n\nThe code fragment below is in pure Python.\n\n.. code:: python\n\n import graphviz\n\n from bisos.graphviz import graphvizSeed\n ng = graphvizSeed.namedGraph # just an abbreviation\n\n def hello() -> graphviz.Digraph:\n\n g = graphviz.Digraph('G',)\n\n g.edge('Hello', 'World')\n\n return g\n\n namedGraphsList = [\n ng(\"hello\", func=hello),\n ]\n\n graphvizSeed.setup(\n namedGraphsList=namedGraphsList,\n )\n\nThe **b:py3:cs:seed/withWhich :seedName \"seedGraphviz.cs\"** dynamic\nblock then results in the execution of the seed:\n\n.. code:: python\n\n __file__ = os.path.abspath(seedPath)\n with open(__file__) as f:\n exec(compile(f.read(), __file__, 'exec'))\n\nIf you wanted to include multiple graphs in one input file, you would\njust add them the **namedGraphsList**.\n\nYou can then just run:\n\n.. code:: bash\n\n hello-graphviz.cs\n\nWhich produces a menu for production of desired formats.\n\nor you can run:\n\n.. code:: bash\n\n hello-graphviz.cs --format=\"all\" -i ngProcess all\n\nWhich produces output in all formats.\n\nInstallation\n============\n\nThe sources for the bisos.graphviz pip package is maintained at:\nhttps://github.com/bisos-pip/graphviz.\n\nThe bisos.graphviz pip package is available at PYPI as\nhttps://pypi.org/project/bisos.graphviz\n\nYou can install bisos.graphviz with pip or pipx.\n\nInstallation With pip\n---------------------\n\nIf you need access to bisos.graphviz as a python module, you can install\nit with pip:\n\n.. code:: bash\n\n pip install bisos.graphviz\n\nInstallation With pipx\n----------------------\n\nIf you only need access to bisos.graphviz as a command on command-line,\nyou can install it with pipx:\n\n.. code:: bash\n\n pipx install bisos.graphviz\n\nThe following commands are made available:\n\n- seedGraphviz.cs\n- exmpl-graphviz.cs\n\nPart of BISOS and ByStar \u2014 ByStar Internet Services Operating System\n====================================================================\n\n| Layered on top of Debian, **BISOS**: (By\\* Internet Services Operating\n System) is a unified and universal framework for developing both\n internet services and software-service continuums that use internet\n services. See `Bootstrapping ByStar, BISOS and\n Blee <https://github.com/bxGenesis/start>`__ for information about\n getting started with BISOS.\n| **BISOS** is a foundation for **The Libre-Halaal ByStar Digital\n Ecosystem** which is described as a cure for losses of autonomy and\n privacy in a book titled: `Nature of\n Polyexistentials <https://github.com/bxplpc/120033>`__\n\n*bisos.graphviz* is part of BISOS.\n\nbisos.graphviz as a Standalone Piece of BISOS\n=============================================\n\nbisos.graphviz is a standalone piece of BISOS. It can be used as a\nself-contained Python package separate from BISOS. Follow the\ninstallation and usage instructions below for your own use.\n\nDocumentation and Blee-Panels\n=============================\n\nbisos.graphviz is part of ByStar Digital Ecosystem\nhttp://www.by-star.net.\n\nThis module's primary documentation is in the form of Blee-Panels.\nAdditional information is also available in:\nhttp://www.by-star.net/PLPC/180047\n\nbisos.graphviz Blee-Panels\n--------------------------\n\nbisos.graphviz Blee-Panels are in ./panels directory. From within Blee\nand BISOS these panels are accessible under the Blee \"Panels\" menu.\n\nSupport\n=======\n\n| For support, criticism, comments and questions; please contact the\n author/maintainer\n| `Mohsen Banan <http://mohsen.1.banan.byname.net>`__ at:\n http://mohsen.1.banan.byname.net/contact\n",
"bugtrack_url": null,
"license": "AGPL",
"summary": "bisos.graphviz: Seeded-PyCS Graphviz",
"version": "0.23",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "416a697851a3485bec07c63cc97f03b1cf335ed94670c66a639d7f46c04ae220",
"md5": "bb8fd8c4232340da3bbcae629f6d9c28",
"sha256": "9aaf1906727ab0de307e9ebc523ca5f3399cfa069058e936fc12ae3e3f8be9d1"
},
"downloads": -1,
"filename": "bisos_graphviz-0.23.tar.gz",
"has_sig": false,
"md5_digest": "bb8fd8c4232340da3bbcae629f6d9c28",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 29892,
"upload_time": "2025-02-17T01:24:25",
"upload_time_iso_8601": "2025-02-17T01:24:25.401956Z",
"url": "https://files.pythonhosted.org/packages/41/6a/697851a3485bec07c63cc97f03b1cf335ed94670c66a639d7f46c04ae220/bisos_graphviz-0.23.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-02-17 01:24:25",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "bisos.graphviz"
}