Skip to content

Commit

Permalink
📚 docs: enhance README.md with formatting improvements and additional…
Browse files Browse the repository at this point in the history
… sections
  • Loading branch information
adriamontoto committed Dec 29, 2024
1 parent 8c24df2 commit 21c2913
Showing 1 changed file with 19 additions and 20 deletions.
39 changes: 19 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<a name="readme-top"></a>

# 🐣💻 Developing Tools

<p align="center">
<a href="https://github.com/adriamontoto/developing-tools/actions/workflows/test.yaml?event=push&branch=master" target="_blank">
<img src="https://github.com/adriamontoto/developing-tools/actions/workflows/test.yaml/badge.svg?event=push&branch=master" alt="Test Pipeline">
Expand All @@ -19,40 +20,42 @@
</a>
</p>

The "Developing Tools" project is a Python 🐍 package designed to enhance the development process by providing a collection of tools/utilities aimed at improving debugging, performance measurement, error handling, ...
The **Developing Tools** project is a Python 🐍 package designed to enhance the development process by providing a collection of tools/utilities aimed at improving debugging, performance measurement, error handling, ...

These tools ⚒️ are intended to assist developers in identifying performance bottlenecks, handling transient errors, and gaining insights into function behavior during runtime. The package is easy to install and use, making it a good addition to any Python developer's toolkit 🚀.
<br><br>


## Table of Contents

- [📥 Installation](#installation)
- [💻 Utilization](#utilization)
- [🤝 Contributing](#contributing)
- [🔑 License](#license)
<br><br>

<p align="right">
<a href="#readme-top">🔼 Back to top</a>
</p>


</p><br><br>

<a name="installation"></a>

## 📥 Installation

You can install **Developing Tools** using `pip`:

```bash
pip install developing-tools
```
<br><br>

<p align="right">
<a href="#readme-top">🔼 Back to top</a>
</p>


</p><br><br>

<a name="utilization"></a>

## 💻 Utilization

### Execution Time

The `execution_time` decorator allows you to measure the execution time of a function. The decorator has one parameter:

- `output_decimals`: Number of decimal places to display in the output. Default is 10.
Expand All @@ -69,13 +72,13 @@ too_slow_function()

# >>> Function "too_slow_function" took 2.00 seconds to execute.
```
<br>

<p align="right">
<a href="#readme-top">🔼 Back to top</a>
</p>

### Retry It

The `retryit` decorator allows you to retry a function multiple times in case of failure. The decorator has two parameters:

- `attempts`: The number of attempts to execute the function, if _None_ the function will be executed indefinitely. Default is _None_.
Expand Down Expand Up @@ -109,14 +112,13 @@ failing_function()
# raise ValueError('This function always fails!')
# ValueError: This function always fails!
```
<br>

<p align="right">
<a href="#readme-top">🔼 Back to top</a>
</p>


### Print Parameters

The `print_parameters` decorator allows you to print the parameters of a function. The decorator has two parameters:

- `show_types`: If _True_ the decorator will print the types of the parameters. Default is _False_.
Expand All @@ -142,13 +144,13 @@ normal_function(1, 'Hello', c=3, d=4)
# >>> Return value:
# >>> "1", supposed type str, real type int
```
<br>

<p align="right">
<a href="#readme-top">🔼 Back to top</a>
</p>

### Timeout

The `timeout` decorator allows you to set a maximum execution time for a function. The decorator has one parameter:

- `seconds`: The maximum number of seconds the function is allowed to execute before raising a _TimeoutError_. Default is 10 seconds.
Expand All @@ -165,17 +167,14 @@ too_slow_function()

# >>> TimeoutError: Function too_slow_function exceeded the 2 seconds timeout.
```
<br><br>

<p align="right">
<a href="#readme-top">🔼 Back to top</a>
</p>
</p><br><br>


<a name="license"></a>
## 🔑 License
This project is licensed under the terms of the [MIT license](https://choosealicense.com/licenses/mit/).
<br><br>

This project is licensed under the terms of the [`MIT license`](https://github.com/adriamontoto/developing-tools/blob/master/LICENSE.md).

<p align="right">
<a href="#readme-top">🔼 Back to top</a>
Expand Down

0 comments on commit 21c2913

Please sign in to comment.