outliner-tracer


Nameoutliner-tracer JSON
Version 1.0.0 PyPI version JSON
download
home_pagehttps://github.com/LucasAndradeDias/outliner
SummaryA tracer for compiled objects
upload_time2023-10-05 19:47:01
maintainer
docs_urlNone
authorLucas A. Dias
requires_python
licenseMIT
keywords tracer outliner tracing complex objects
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# Outliner

Have you ever got confused trying to undestand python complex object invoking sequence?! Now it is a solved problem.

Outliner is a Python utility designed to simplify the process of tracing the calling flow of callable objects within a complex Python object. It aims to help developers understand the order in which callable objects are invoked within complex code structures, making it easier to navigate and comprehend such structures.



## Table of Contents
- [Example](#example)
- [Installation](#installation)
- [Usage](#usage)
- [Features](#features)
- [Contributing](#contributing)

## Example

We have the given complex object:
```python
class test:
    def __init__(self) -> None:
        self.func1()
    def func1(self):
        self.func2()
        return
    def func2(self):
        return
def test2():
    a = test()
    return
``` 

With the outliner you can visualize the invoking flow in order with the default tree display:
```
 outliner --file_path=path-to-module --object_name=test
```
output:
```bash
    test2
    │
    │──1. __init__
    │
    │──2. func1
    │
    │──3. func2
```

Or get more detailed data about invoked objects (-d="detailed_data"):
```
 outliner --file_path=path-to-module --object_name=test -d="detailed_data"
```
output:
```bash
('test2', {'call': 1, 'return': 1, 'line': 2})
('__init__', {'call': 1, 'return': 1, 'line': 1})
('func1', {'call': 1, 'return': 1, 'line': 2})
('func2', {'call': 1, 'return': 1, 'line': 1})
```


## Features

-   **Function Tracing**: Trace function calls, returns, and line execution within a Python module.
-   **Data Collection**: Collect detailed data on function executions and execution flow.
-   **Method Tree**: Display a tree of functions used by the object for object behavior exploration.
-   **Easy Integration**: Simple and straightforward integration into your Python projects.
-   **Customizable**: Fine-tune tracing parameters to suit your debugging and exploration

## Installation
As the library hasn't been released yet, to use it on your machine, you will need to do following steps:

-	**Use pip install:**
	Make sure that path contains the setup.py file
	``` 
	pip install -i https://test.pypi.org/simple/ outliner
	```

## Usage

The Outliner library can be used via the command-line interface (CLI) to trace Python code. Follow these steps to use it:

1.  Open your terminal.
    
2.  Run the following command to trace a Python object's execution:
    

bashCopy code

`outliner --file_path=<path-to-object> --object_name=<object-name> --object_args=<arguments-passed-to-object>` 

## Command Line Options

-   `--file_path`: Specifies the path to the Python module containing the object to be traced.
    
-   `--object_name`: Specifies the name of the object to be traced.
    
-   `--object_args`: Optionally, you can specify arguments to pass to the object.
-   `--display`: Optionally, you can choose the output type(tree or detaield_data)

## Contributing

Contributions to the Outliner library are welcome. If you have ideas for improvements, find any issues, or want to contribute to its development, please open an [issue](https://github.com/your-repo/issues) or submit a [pull request](https://github.com/your-repo/pulls) on GitHub.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/LucasAndradeDias/outliner",
    "name": "outliner-tracer",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "tracer,outliner,tracing,complex,objects",
    "author": "Lucas A. Dias",
    "author_email": "lucasan1234565@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/8d/b8/92fb4ac5923d93d4da03cc05a2e10376e783b91682a7e2ab17152c7e2675/outliner-tracer-1.0.0.tar.gz",
    "platform": null,
    "description": "\n# Outliner\n\nHave you ever got confused trying to undestand python complex object invoking sequence?! Now it is a solved problem.\n\nOutliner is a Python utility designed to simplify the process of tracing the calling flow of callable objects within a complex Python object. It aims to help developers understand the order in which callable objects are invoked within complex code structures, making it easier to navigate and comprehend such structures.\n\n\n\n## Table of Contents\n- [Example](#example)\n- [Installation](#installation)\n- [Usage](#usage)\n- [Features](#features)\n- [Contributing](#contributing)\n\n## Example\n\nWe have the given complex object:\n```python\nclass test:\n    def __init__(self) -> None:\n        self.func1()\n    def func1(self):\n        self.func2()\n        return\n    def func2(self):\n        return\ndef test2():\n    a = test()\n    return\n``` \n\nWith the outliner you can visualize the invoking flow in order with the default tree display:\n```\n outliner --file_path=path-to-module --object_name=test\n```\noutput:\n```bash\n    test2\n    \u2502\n    \u2502\u2500\u25001. __init__\n    \u2502\n    \u2502\u2500\u25002. func1\n    \u2502\n    \u2502\u2500\u25003. func2\n```\n\nOr get more detailed data about invoked objects (-d=\"detailed_data\"):\n```\n outliner --file_path=path-to-module --object_name=test -d=\"detailed_data\"\n```\noutput:\n```bash\n('test2', {'call': 1, 'return': 1, 'line': 2})\n('__init__', {'call': 1, 'return': 1, 'line': 1})\n('func1', {'call': 1, 'return': 1, 'line': 2})\n('func2', {'call': 1, 'return': 1, 'line': 1})\n```\n\n\n## Features\n\n-   **Function Tracing**: Trace function calls, returns, and line execution within a Python module.\n-   **Data Collection**: Collect detailed data on function executions and execution flow.\n-   **Method Tree**: Display a tree of functions used by the object for object behavior exploration.\n-   **Easy Integration**: Simple and straightforward integration into your Python projects.\n-   **Customizable**: Fine-tune tracing parameters to suit your debugging and exploration\n\n## Installation\nAs the library hasn't been released yet, to use it on your machine, you will need to do following steps:\n\n-\t**Use pip install:**\n\tMake sure that path contains the setup.py file\n\t``` \n\tpip install -i https://test.pypi.org/simple/ outliner\n\t```\n\n## Usage\n\nThe Outliner library can be used via the command-line interface (CLI) to trace Python code. Follow these steps to use it:\n\n1.  Open your terminal.\n    \n2.  Run the following command to trace a Python object's execution:\n    \n\nbashCopy code\n\n`outliner --file_path=<path-to-object> --object_name=<object-name> --object_args=<arguments-passed-to-object>` \n\n## Command Line Options\n\n-   `--file_path`: Specifies the path to the Python module containing the object to be traced.\n    \n-   `--object_name`: Specifies the name of the object to be traced.\n    \n-   `--object_args`: Optionally, you can specify arguments to pass to the object.\n-   `--display`: Optionally, you can choose the output type(tree or detaield_data)\n\n## Contributing\n\nContributions to the Outliner library are welcome. If you have ideas for improvements, find any issues, or want to contribute to its development, please open an [issue](https://github.com/your-repo/issues) or submit a [pull request](https://github.com/your-repo/pulls) on GitHub.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A tracer for compiled objects",
    "version": "1.0.0",
    "project_urls": {
        "Homepage": "https://github.com/LucasAndradeDias/outliner"
    },
    "split_keywords": [
        "tracer",
        "outliner",
        "tracing",
        "complex",
        "objects"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7164d1c6c251c0b3833f20cf24e895a6e915c8c16003f67a5bede2446695983a",
                "md5": "6fc14fec2b550aef017a5d3784c357a9",
                "sha256": "7ac00dbe1418e961bdd06bd497c58b9c779c3b6d730b2bbcd9749a1e4744a93b"
            },
            "downloads": -1,
            "filename": "outliner_tracer-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6fc14fec2b550aef017a5d3784c357a9",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 6534,
            "upload_time": "2023-10-05T19:47:00",
            "upload_time_iso_8601": "2023-10-05T19:47:00.181075Z",
            "url": "https://files.pythonhosted.org/packages/71/64/d1c6c251c0b3833f20cf24e895a6e915c8c16003f67a5bede2446695983a/outliner_tracer-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8db892fb4ac5923d93d4da03cc05a2e10376e783b91682a7e2ab17152c7e2675",
                "md5": "91434ecb803c88fda8cf0eed22c74faa",
                "sha256": "edc4665ea15e4c12c2d6805422223b3fbb39993ed310df72c7e6209d456832cd"
            },
            "downloads": -1,
            "filename": "outliner-tracer-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "91434ecb803c88fda8cf0eed22c74faa",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 6752,
            "upload_time": "2023-10-05T19:47:01",
            "upload_time_iso_8601": "2023-10-05T19:47:01.988579Z",
            "url": "https://files.pythonhosted.org/packages/8d/b8/92fb4ac5923d93d4da03cc05a2e10376e783b91682a7e2ab17152c7e2675/outliner-tracer-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-05 19:47:01",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "LucasAndradeDias",
    "github_project": "outliner",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "outliner-tracer"
}
        
Elapsed time: 0.13998s