FlowVisor


NameFlowVisor JSON
Version 0.1.10 PyPI version JSON
download
home_pagehttps://github.com/cophilot/FlowVisor
SummaryVisualize and profile your python code with FlowVisor.
upload_time2024-05-13 12:31:10
maintainerNone
docs_urlNone
authorcophilot (Philipp B.)
requires_pythonNone
licenseMIT
keywords python flow visualize code flowvisor profiling profile decorator
VCS
bugtrack_url
requirements Pillow diagrams pickle-mixin plotly
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <div align="center">
  <br />
  <!-- <img src="" alt="FlowVisorLogo" width="30%"/> -->
  <h1>FlowVisor</h1>
  <p>
    Visualize the flow of your python code.
  </p>
</div>

<!-- Badges -->
<div align="center">
   <!-- <a href="https://github.com/cophilot/FlowVisor/releases">
       <img src="https://img.shields.io/github/v/release/cophilot/FlowVisor?display_name=tag" alt="current realease" />
   </a> -->
   <a href="https://github.com/cophilot/FlowVisor/blob/master/LICENSE">
       <img src="https://img.shields.io/github/license/cophilot/FlowVisor" alt="license" />
   </a>
   <a href="https://github.com/cophilot/FlowVisor/stargazers">
       <img src="https://img.shields.io/github/stars/cophilot/FlowVisor" alt="stars" />
   </a>
   <a href="https://github.com/cophilot/FlowVisor/commits/master">
       <img src="https://img.shields.io/github/last-commit/cophilot/FlowVisor" alt="last commit" />
   </a>
</div>

---

![FlowVisor-Example](https://raw.githubusercontent.com/cophilot/FlowVisor/main/assets/example.png)

---

-   [Installation](#installation)
-   [Usage](#usage)
-   [CLI](#cli)
    -   [add-vis](#add-vis)
    -   [remove-vis](#remove-vis)
    -   [vis-file](#vis-file)
-   [Overhead](#overhead)
-   [Development](#development)
-   [Example](#example)

---

## Installation

```bash
pip install FlowVisor
```

---

## Usage

```python
from FlowVisor import FlowVisor, vis

@vis # This will visualize the function in the flow
def my_function():
    print("Hello World")

@vis
def my_other_function():
    my_function()

my_other_function()
FlowVisor.CONFIG.output_file = "example_graph" # You can add some configureation with the CONFIG object
FlowVisor.graph() # Generate the graph
FlowVisor.export("example_flow", "json") # Save the flow as json

```

---

## CLI

### add-vis

Adds the vis decorator to all functions in all python files in a directory.

```bash
add-vis -p <path-to-dir>
```

### remove-vis

Removes the vis decorator from all functions in all python files in a directory.

```bash
remove-vis -p <path-to-dir>
```

### vis-file

Generate a graph from a exported flow file.

```bash
vis-file -f <path-to-flow-file>
```

---

## Overhead

The overhead of the FlowVisor is tried to be kept as low as possible. The overhead is mainly caused by the decorator. Therefore the time for running the logic of the Flowvisor is excluded from the profiling.

You can even descrease the overhead by the `advanced_ovhead_reduction`:

```python
FlowVisor.enable_advanced_overhead_reduction()
```

---

## Development

```bash
git clone https://github.com/cophilot/FlowVisor
cd FlowVisor
pip install -r requirements.txt
```

---

## Example

Run the example:

```python
pip install -r requirements.txt
python example.py
```

---

<!-- ## Bugs

-   _no known bugs_

---

## [Release Notes](https://github.com/cophilot/FlowVisor/blob/master/CHANGELOG.md)

### [v0.0.1](https://github.com/cophilot/FlowVisor/tree/0.0.1)

-   _Initial release_
 -->

by [Philipp B.](https://github.com/cophilot)



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/cophilot/FlowVisor",
    "name": "FlowVisor",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "python, flow, visualize, code, flowvisor, profiling, profile, decorator",
    "author": "cophilot (Philipp B.)",
    "author_email": "<info@philipp-bonin.com>",
    "download_url": "https://files.pythonhosted.org/packages/a1/55/e4b7a810965d5adca11925d1d82e178657fa8291ba23cec0b9728861c743/FlowVisor-0.1.10.tar.gz",
    "platform": null,
    "description": "<div align=\"center\">\n  <br />\n  <!-- <img src=\"\" alt=\"FlowVisorLogo\" width=\"30%\"/> -->\n  <h1>FlowVisor</h1>\n  <p>\n    Visualize the flow of your python code.\n  </p>\n</div>\n\n<!-- Badges -->\n<div align=\"center\">\n   <!-- <a href=\"https://github.com/cophilot/FlowVisor/releases\">\n       <img src=\"https://img.shields.io/github/v/release/cophilot/FlowVisor?display_name=tag\" alt=\"current realease\" />\n   </a> -->\n   <a href=\"https://github.com/cophilot/FlowVisor/blob/master/LICENSE\">\n       <img src=\"https://img.shields.io/github/license/cophilot/FlowVisor\" alt=\"license\" />\n   </a>\n   <a href=\"https://github.com/cophilot/FlowVisor/stargazers\">\n       <img src=\"https://img.shields.io/github/stars/cophilot/FlowVisor\" alt=\"stars\" />\n   </a>\n   <a href=\"https://github.com/cophilot/FlowVisor/commits/master\">\n       <img src=\"https://img.shields.io/github/last-commit/cophilot/FlowVisor\" alt=\"last commit\" />\n   </a>\n</div>\n\n---\n\n![FlowVisor-Example](https://raw.githubusercontent.com/cophilot/FlowVisor/main/assets/example.png)\n\n---\n\n-   [Installation](#installation)\n-   [Usage](#usage)\n-   [CLI](#cli)\n    -   [add-vis](#add-vis)\n    -   [remove-vis](#remove-vis)\n    -   [vis-file](#vis-file)\n-   [Overhead](#overhead)\n-   [Development](#development)\n-   [Example](#example)\n\n---\n\n## Installation\n\n```bash\npip install FlowVisor\n```\n\n---\n\n## Usage\n\n```python\nfrom FlowVisor import FlowVisor, vis\n\n@vis # This will visualize the function in the flow\ndef my_function():\n    print(\"Hello World\")\n\n@vis\ndef my_other_function():\n    my_function()\n\nmy_other_function()\nFlowVisor.CONFIG.output_file = \"example_graph\" # You can add some configureation with the CONFIG object\nFlowVisor.graph() # Generate the graph\nFlowVisor.export(\"example_flow\", \"json\") # Save the flow as json\n\n```\n\n---\n\n## CLI\n\n### add-vis\n\nAdds the vis decorator to all functions in all python files in a directory.\n\n```bash\nadd-vis -p <path-to-dir>\n```\n\n### remove-vis\n\nRemoves the vis decorator from all functions in all python files in a directory.\n\n```bash\nremove-vis -p <path-to-dir>\n```\n\n### vis-file\n\nGenerate a graph from a exported flow file.\n\n```bash\nvis-file -f <path-to-flow-file>\n```\n\n---\n\n## Overhead\n\nThe overhead of the FlowVisor is tried to be kept as low as possible. The overhead is mainly caused by the decorator. Therefore the time for running the logic of the Flowvisor is excluded from the profiling.\n\nYou can even descrease the overhead by the `advanced_ovhead_reduction`:\n\n```python\nFlowVisor.enable_advanced_overhead_reduction()\n```\n\n---\n\n## Development\n\n```bash\ngit clone https://github.com/cophilot/FlowVisor\ncd FlowVisor\npip install -r requirements.txt\n```\n\n---\n\n## Example\n\nRun the example:\n\n```python\npip install -r requirements.txt\npython example.py\n```\n\n---\n\n<!-- ## Bugs\n\n-   _no known bugs_\n\n---\n\n## [Release Notes](https://github.com/cophilot/FlowVisor/blob/master/CHANGELOG.md)\n\n### [v0.0.1](https://github.com/cophilot/FlowVisor/tree/0.0.1)\n\n-   _Initial release_\n -->\n\nby [Philipp B.](https://github.com/cophilot)\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Visualize and profile your python code with FlowVisor.",
    "version": "0.1.10",
    "project_urls": {
        "Homepage": "https://github.com/cophilot/FlowVisor"
    },
    "split_keywords": [
        "python",
        " flow",
        " visualize",
        " code",
        " flowvisor",
        " profiling",
        " profile",
        " decorator"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ca3b363fd1554e8d42158e018a265ec50a8e342a2550dff214ab8ac80cc092e2",
                "md5": "fca502c8e61a426fbb906c9f535a0c94",
                "sha256": "e8c81d990faa6c493f24f98e35f0059007da7c4d945f40ffdf84eed6529b3f8b"
            },
            "downloads": -1,
            "filename": "FlowVisor-0.1.10-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "fca502c8e61a426fbb906c9f535a0c94",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 20110,
            "upload_time": "2024-05-13T12:31:08",
            "upload_time_iso_8601": "2024-05-13T12:31:08.619858Z",
            "url": "https://files.pythonhosted.org/packages/ca/3b/363fd1554e8d42158e018a265ec50a8e342a2550dff214ab8ac80cc092e2/FlowVisor-0.1.10-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a155e4b7a810965d5adca11925d1d82e178657fa8291ba23cec0b9728861c743",
                "md5": "3ce3d4d105a1d04a86ab3fc8dc488f59",
                "sha256": "e74dae83dda37bb4cc4f0dba3b4062fc642243d0462807e614b4a48372a66216"
            },
            "downloads": -1,
            "filename": "FlowVisor-0.1.10.tar.gz",
            "has_sig": false,
            "md5_digest": "3ce3d4d105a1d04a86ab3fc8dc488f59",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 15488,
            "upload_time": "2024-05-13T12:31:10",
            "upload_time_iso_8601": "2024-05-13T12:31:10.455117Z",
            "url": "https://files.pythonhosted.org/packages/a1/55/e4b7a810965d5adca11925d1d82e178657fa8291ba23cec0b9728861c743/FlowVisor-0.1.10.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-13 12:31:10",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "cophilot",
    "github_project": "FlowVisor",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "Pillow",
            "specs": [
                [
                    "~=",
                    "10.3.0"
                ]
            ]
        },
        {
            "name": "diagrams",
            "specs": [
                [
                    "~=",
                    "0.23.4"
                ]
            ]
        },
        {
            "name": "pickle-mixin",
            "specs": [
                [
                    "~=",
                    "1.0.2"
                ]
            ]
        },
        {
            "name": "plotly",
            "specs": []
        }
    ],
    "lcname": "flowvisor"
}
        
Elapsed time: 0.30040s