FastDebugger
==================
<p align="center">
<img src="https://raw.githubusercontent.com/RasseTheBoy/FastDebugger/main/Logo/fast_debugger_logo.png" width=300>
</p>
FastDebugger is a debugging tool for Python that allows users to quickly and easily print the values of variables in their code. To use FastDebugger, users simply call the `fd()` function and pass it the variables they want to print. FastDebugger will then print the variable name, value and [other useful information](#how-to-use). This can be helpful for quickly checking the values of variables and troubleshooting code.
[![GitHub release (latest by date)](https://img.shields.io/github/v/release/RasseTheBoy/FastDebugger?style=flat-square)](https://github.com/RasseTheBoy/FastDebugger/releases/latest)
![Working status](https://img.shields.io/badge/status-working-success?style=flat-square)
[![Working Python version](https://img.shields.io/badge/Python-%2B3.6-informational?style=flat-square&logo=python)](https://www.python.org/)
![PyPI - License](https://img.shields.io/pypi/l/FastDebugger?style=flat-square)
# Contents
- [Author](#author)
- [Installation](#installation)
- [Call variables](#call-variables)
- [Examples](#examples)
- [How to use](#how-to-use)
- [Basic example](#basic-example)
- [Lists, sets, tuples and dictionarys](#lists-sets-tuples-and-dictionarys)
- [Numpy arrays](#numpy-arrays)
# Author
- [@RasseTheBoy](https://github.com/RasseTheBoy)
# Installation
Install using pip
```bash
pip install FastDebugger
pip3 install FastDebugger
```
# Call variables
```py
fd(*args:Any, nl:bool=True)
```
The `fd()` call can take in any variables as arguments. It does not matter what type the variables are or how many there are. FastDebugger will print the type and value of each variable passed to it.
The `nl` parameter determines if a newline is printed after the `fd()` call.
## Examples
### Input:
```py
from FastDebugger import fd
fd = FastDebugger()
lst = [123, True, 'Hello world!']
fd(lst, nl=True)
print('Foo')
fd(lst, nl=False) # Default value of `nl` is False
print('Foo')
```
### Output:
```py
fd | list | 3 | lst
╟ | int | 0 | 123
╟ | bool | 1 | True
╚ | str | 2 | 'Hello world!'
Foo
fd | list | 3 | lst
╟ | int | 0 | 123
╟ | bool | 1 | True
╚ | str | 2 | 'Hello world!'
Foo
```
# How to use
## Basic example
### Input:
```py
from FastDebugger import fd
def foo(x, y, z):
result = x + y + z
fd(x, y, z, result)
foo(1, 2, 3)
```
### Output:
```py
fd | int | x: 1
fd | int | y: 2
fd | int | z: 3
fd | int | result: 6
```
### Output format:
```
fd | {variable type} | {variable name}: {variable value}
```
## Lists, sets, tuples and dictionarys
### Input:
```py
from FastDebugger import fd
from random import randint
def bar(n):
lst = [randint(0, n) for _ in range(n)]
dct = {f'key_{i}': randint(0, n) for i in range(n)}
tpl = tuple(randint(0, n) for _ in range(n))
st = {randint(0, n) for _ in range(n)}
fd(lst, st, tpl, dct, nl=True)
bar(5)
```
### Output:
```py
fd | list | 5 | lst
╟ | int | 0 | 4
╟ | int | 1 | 5
╟ | int | 2 | 3
╟ | int | 3 | 5
╚ | int | 4 | 4
fd | set | 3 | st
╟ | int | 0 | 0
╟ | int | 1 | 2
╚ | int | 2 | 3
fd | tuple | 5 | tpl
╟ | int | 0 | 3
╟ | int | 1 | 5
╟ | int | 2 | 0
╟ | int | 3 | 3
╚ | int | 4 | 5
fd | dict | 5 | dct
╟ | int | 0 | key_0: 0
╟ | int | 1 | key_1: 1
╟ | int | 2 | key_2: 1
╟ | int | 3 | key_3: 0
╚ | int | 4 | key_4: 3
```
### Output format (list, set, tuple):
```
fd | {array type} | {array length} | {array name}
╚ | {variable type} | {index in array} | {variable value}
```
### Output format (dictionary):
```
fd | dict | {dict length} | {dict name}
╚ | {value type} | {index in dict} | {key}: {value}
```
## Numpy arrays
### Input:
```py
from FastDebugger import fd
import numpy as np
def bar(a, b):
c = a * b
d = np.sin(c)
e = np.cos(d)
f = np.tan(e)
fd(a, b, c, d, e, f, nl=True)
bar(np.array([1, 2, 3]), np.array([4, 5, 6]))
```
### Output:
```py
fd | ndarray | 3 | a
╟ | int32 | 0 | 1
╟ | int32 | 1 | 2
╚ | int32 | 2 | 3
fd | ndarray | 3 | b
╟ | int32 | 0 | 4
╟ | int32 | 1 | 5
╚ | int32 | 2 | 6
fd | ndarray | 3 | c
╟ | int32 | 0 | 4
╟ | int32 | 1 | 10
╚ | int32 | 2 | 18
fd | ndarray | 3 | d
╟ | float64 | 0 | -0.7568024953079282
╟ | float64 | 1 | -0.5440211108893698
╚ | float64 | 2 | -0.7509872467716762
fd | ndarray | 3 | e
╟ | float64 | 0 | 0.7270351311688124
╟ | float64 | 1 | 0.8556343548213666
╚ | float64 | 2 | 0.7310155667453406
fd | ndarray | 3 | f
╟ | float64 | 0 | 0.8895922779758605
╟ | float64 | 1 | 1.1513517113559995
╚ | float64 | 2 | 0.8967481047747234
```
### Output format (exactly like lists, sets...):
```
fd | {array type} | {array length} | {array name}
╚ | {variable type} | {index in array} | {variable value}
```
Raw data
{
"_id": null,
"home_page": "https://github.com/RasseTheBoy/FastDebugger",
"name": "FastDebugger",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "",
"keywords": "",
"author": "Rasmus Ohert",
"author_email": "Rasmus Ohert <rassemichael@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/8e/70/5a3637f6d7f05b328233855e0e9cc16701ccd098cb2393ee5efa615e01d4/FastDebugger-0.0.43.tar.gz",
"platform": null,
"description": "FastDebugger\n==================\n\n<p align=\"center\">\n <img src=\"https://raw.githubusercontent.com/RasseTheBoy/FastDebugger/main/Logo/fast_debugger_logo.png\" width=300>\n</p>\n\nFastDebugger is a debugging tool for Python that allows users to quickly and easily print the values of variables in their code. To use FastDebugger, users simply call the `fd()` function and pass it the variables they want to print. FastDebugger will then print the variable name, value and [other useful information](#how-to-use). This can be helpful for quickly checking the values of variables and troubleshooting code.\n\n[![GitHub release (latest by date)](https://img.shields.io/github/v/release/RasseTheBoy/FastDebugger?style=flat-square)](https://github.com/RasseTheBoy/FastDebugger/releases/latest)\n![Working status](https://img.shields.io/badge/status-working-success?style=flat-square)\n[![Working Python version](https://img.shields.io/badge/Python-%2B3.6-informational?style=flat-square&logo=python)](https://www.python.org/)\n![PyPI - License](https://img.shields.io/pypi/l/FastDebugger?style=flat-square)\n\n# Contents\n\n- [Author](#author)\n- [Installation](#installation)\n- [Call variables](#call-variables)\n - [Examples](#examples)\n- [How to use](#how-to-use)\n - [Basic example](#basic-example)\n - [Lists, sets, tuples and dictionarys](#lists-sets-tuples-and-dictionarys)\n - [Numpy arrays](#numpy-arrays)\n\n# Author\n\n- [@RasseTheBoy](https://github.com/RasseTheBoy)\n\n# Installation\n\nInstall using pip\n\n```bash\n pip install FastDebugger\n\n pip3 install FastDebugger\n```\n\n# Call variables\n\n```py\nfd(*args:Any, nl:bool=True)\n```\n\nThe `fd()` call can take in any variables as arguments. It does not matter what type the variables are or how many there are. FastDebugger will print the type and value of each variable passed to it.\n\nThe `nl` parameter determines if a newline is printed after the `fd()` call.\n\n## Examples\n\n### Input:\n```py\nfrom FastDebugger import fd\n\nfd = FastDebugger()\n\nlst = [123, True, 'Hello world!']\n\nfd(lst, nl=True)\nprint('Foo')\nfd(lst, nl=False) # Default value of `nl` is False\nprint('Foo')\n```\n\n### Output:\n```py\nfd | list | 3 | lst\n \u255f | int | 0 | 123\n \u255f | bool | 1 | True\n \u255a | str | 2 | 'Hello world!'\n\nFoo\nfd | list | 3 | lst\n \u255f | int | 0 | 123\n \u255f | bool | 1 | True\n \u255a | str | 2 | 'Hello world!'\nFoo\n```\n\n# How to use\n\n## Basic example\n\n### Input:\n```py\nfrom FastDebugger import fd\n\ndef foo(x, y, z):\n result = x + y + z\n fd(x, y, z, result)\n\nfoo(1, 2, 3)\n```\n\n### Output:\n```py\nfd | int | x: 1\nfd | int | y: 2\nfd | int | z: 3\nfd | int | result: 6\n```\n\n### Output format:\n```\nfd | {variable type} | {variable name}: {variable value}\n```\n\n## Lists, sets, tuples and dictionarys\n\n### Input:\n```py\nfrom FastDebugger import fd\nfrom random import randint\n\ndef bar(n):\n lst = [randint(0, n) for _ in range(n)]\n dct = {f'key_{i}': randint(0, n) for i in range(n)}\n tpl = tuple(randint(0, n) for _ in range(n))\n st = {randint(0, n) for _ in range(n)}\n\n fd(lst, st, tpl, dct, nl=True)\n\nbar(5)\n```\n\n### Output:\n```py\nfd | list | 5 | lst\n \u255f | int | 0 | 4\n \u255f | int | 1 | 5\n \u255f | int | 2 | 3\n \u255f | int | 3 | 5\n \u255a | int | 4 | 4\n\nfd | set | 3 | st\n \u255f | int | 0 | 0\n \u255f | int | 1 | 2\n \u255a | int | 2 | 3\n\nfd | tuple | 5 | tpl\n \u255f | int | 0 | 3\n \u255f | int | 1 | 5\n \u255f | int | 2 | 0\n \u255f | int | 3 | 3\n \u255a | int | 4 | 5\n\nfd | dict | 5 | dct\n \u255f | int | 0 | key_0: 0\n \u255f | int | 1 | key_1: 1\n \u255f | int | 2 | key_2: 1\n \u255f | int | 3 | key_3: 0\n \u255a | int | 4 | key_4: 3\n```\n\n### Output format (list, set, tuple):\n```\nfd | {array type} | {array length} | {array name}\n \u255a | {variable type} | {index in array} | {variable value}\n```\n\n### Output format (dictionary):\n```\nfd | dict | {dict length} | {dict name}\n \u255a | {value type} | {index in dict} | {key}: {value}\n```\n\n## Numpy arrays\n\n### Input:\n```py\nfrom FastDebugger import fd\nimport numpy as np\n\ndef bar(a, b):\n c = a * b\n d = np.sin(c)\n e = np.cos(d)\n f = np.tan(e)\n fd(a, b, c, d, e, f, nl=True)\n\nbar(np.array([1, 2, 3]), np.array([4, 5, 6]))\n```\n\n### Output:\n```py\nfd | ndarray | 3 | a\n \u255f | int32 | 0 | 1\n \u255f | int32 | 1 | 2\n \u255a | int32 | 2 | 3\n\nfd | ndarray | 3 | b\n \u255f | int32 | 0 | 4\n \u255f | int32 | 1 | 5\n \u255a | int32 | 2 | 6\n\nfd | ndarray | 3 | c\n \u255f | int32 | 0 | 4\n \u255f | int32 | 1 | 10\n \u255a | int32 | 2 | 18\n\nfd | ndarray | 3 | d\n \u255f | float64 | 0 | -0.7568024953079282\n \u255f | float64 | 1 | -0.5440211108893698\n \u255a | float64 | 2 | -0.7509872467716762\n\nfd | ndarray | 3 | e\n \u255f | float64 | 0 | 0.7270351311688124\n \u255f | float64 | 1 | 0.8556343548213666\n \u255a | float64 | 2 | 0.7310155667453406\n\nfd | ndarray | 3 | f\n \u255f | float64 | 0 | 0.8895922779758605\n \u255f | float64 | 1 | 1.1513517113559995\n \u255a | float64 | 2 | 0.8967481047747234\n```\n\n### Output format (exactly like lists, sets...):\n```\nfd | {array type} | {array length} | {array name}\n \u255a | {variable type} | {index in array} | {variable value}\n```\n",
"bugtrack_url": null,
"license": "",
"summary": "Fast debugger for Python 3",
"version": "0.0.43",
"project_urls": {
"Homepage": "https://github.com/RasseTheBoy/FastDebugger"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "44d284eeb2116348808f2cd90912b4cdf91a84dd5fe21c564aabc9b21c3aa866",
"md5": "63f9a62fde9dbee1ad5c5d67372dc65f",
"sha256": "50a6ca9e2ddba20f119020334779ac79fbb3347209f9cf46c4cd571772b7da4d"
},
"downloads": -1,
"filename": "FastDebugger-0.0.43-py3-none-any.whl",
"has_sig": false,
"md5_digest": "63f9a62fde9dbee1ad5c5d67372dc65f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 7295,
"upload_time": "2024-01-02T23:09:15",
"upload_time_iso_8601": "2024-01-02T23:09:15.264556Z",
"url": "https://files.pythonhosted.org/packages/44/d2/84eeb2116348808f2cd90912b4cdf91a84dd5fe21c564aabc9b21c3aa866/FastDebugger-0.0.43-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "8e705a3637f6d7f05b328233855e0e9cc16701ccd098cb2393ee5efa615e01d4",
"md5": "a2cda4e4c1f6a791abafae9dc661169e",
"sha256": "3b001243bfabf61c736ad867fc67b3aba30a3e18e37a49e693ad090f1739fbef"
},
"downloads": -1,
"filename": "FastDebugger-0.0.43.tar.gz",
"has_sig": false,
"md5_digest": "a2cda4e4c1f6a791abafae9dc661169e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 7032,
"upload_time": "2024-01-02T23:09:16",
"upload_time_iso_8601": "2024-01-02T23:09:16.944972Z",
"url": "https://files.pythonhosted.org/packages/8e/70/5a3637f6d7f05b328233855e0e9cc16701ccd098cb2393ee5efa615e01d4/FastDebugger-0.0.43.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-01-02 23:09:16",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "RasseTheBoy",
"github_project": "FastDebugger",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "fastdebugger"
}