FlowVisor


NameFlowVisor JSON
Version 0.3.2 PyPI version JSON
download
home_pagehttps://github.com/cophilot/FlowVisor
SummaryVisualize and profile your python code with FlowVisor.
upload_time2024-08-02 05:43:37
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="https://raw.githubusercontent.com/cophilot/FlowVisor/main/assets/logo.png" alt="FlowVisor" width="60%"/>
  <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/72/a7/5ca6ccff31af0b12a1d538b55211ad8a2fc49acc1155a047209075a25126/FlowVisor-0.3.2.tar.gz",
    "platform": null,
    "description": "<div align=\"center\">\n  <br />\n  <img src=\"https://raw.githubusercontent.com/cophilot/FlowVisor/main/assets/logo.png\" alt=\"FlowVisor\" width=\"60%\"/>\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.3.2",
    "project_urls": {
        "Homepage": "https://github.com/cophilot/FlowVisor"
    },
    "split_keywords": [
        "python",
        " flow",
        " visualize",
        " code",
        " flowvisor",
        " profiling",
        " profile",
        " decorator"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0411d14d97109e0f60f8dbc3289ddbf362f52e482b30f26aeb194fc8af207396",
                "md5": "ca35d77df046975c82b1dbccd6a036d3",
                "sha256": "43969b0382e1f831ef79e8c05c7c6233bdaa7e18716b45d9bd2995e679269478"
            },
            "downloads": -1,
            "filename": "FlowVisor-0.3.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ca35d77df046975c82b1dbccd6a036d3",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 24568,
            "upload_time": "2024-08-02T05:43:35",
            "upload_time_iso_8601": "2024-08-02T05:43:35.094985Z",
            "url": "https://files.pythonhosted.org/packages/04/11/d14d97109e0f60f8dbc3289ddbf362f52e482b30f26aeb194fc8af207396/FlowVisor-0.3.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "72a75ca6ccff31af0b12a1d538b55211ad8a2fc49acc1155a047209075a25126",
                "md5": "1457cc90b4e488d052b7f22bd606981b",
                "sha256": "710675cfb8b09683e3e64dc94fd9b17125f4b2b0cea9ee17f8c2025f3969cb2c"
            },
            "downloads": -1,
            "filename": "FlowVisor-0.3.2.tar.gz",
            "has_sig": false,
            "md5_digest": "1457cc90b4e488d052b7f22bd606981b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 18778,
            "upload_time": "2024-08-02T05:43:37",
            "upload_time_iso_8601": "2024-08-02T05:43:37.029940Z",
            "url": "https://files.pythonhosted.org/packages/72/a7/5ca6ccff31af0b12a1d538b55211ad8a2fc49acc1155a047209075a25126/FlowVisor-0.3.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-02 05:43:37",
    "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": []
        },
        {
            "name": "diagrams",
            "specs": [
                [
                    "~=",
                    "0.23.4"
                ]
            ]
        },
        {
            "name": "pickle-mixin",
            "specs": [
                [
                    "~=",
                    "1.0.2"
                ]
            ]
        },
        {
            "name": "plotly",
            "specs": []
        }
    ],
    "lcname": "flowvisor"
}
        
Elapsed time: 0.41292s