Welcome to Pyhunt, a lightweight Python logging tool designed for visual call tracing and tree-structured colored logs. With Pyhunt, you can debug your code easily using a simple decorator. It is optimized for both standard and AI-generated codebases, making it a versatile choice for developers.
Download the latest release here!
- Visual Call Tracing: Track function calls and their relationships visually.
- Tree-Structured Logs: View logs in a structured format that is easy to read.
- Colored Output: Get color-coded logs to quickly identify different log levels.
- Simple Decorator: Use a straightforward decorator to enable logging.
- Optimized for AI Code: Works well with AI-generated codebases.
- Compatible with Standard Code: Integrates seamlessly into traditional Python projects.
To install Pyhunt, you can use pip. Run the following command in your terminal:
pip install pyhunt
After installation, you can start using Pyhunt in your Python projects.
Using Pyhunt is simple. Just import the tool and decorate the functions you want to trace. Here’s how you can do it:
from pyhunt import log
@log
def my_function():
print("Hello, World!")
my_function()
This will generate a structured log of the function call, making it easy to debug and trace.
Here are a few examples to help you get started:
from pyhunt import log
@log
def add(a, b):
return a + b
result = add(5, 3)
print(result)
from pyhunt import log
@log
def multiply(a, b):
return a * b
result = multiply(4, 7)
print(result)
from pyhunt import log
class Calculator:
@log
def subtract(self, a, b):
return a - b
calc = Calculator()
result = calc.subtract(10, 5)
print(result)
from pyhunt import log
@log
def divide(a, b):
return a / b
try:
result = divide(10, 0)
except ZeroDivisionError:
print("Cannot divide by zero.")
We welcome contributions to Pyhunt! If you want to contribute, please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Make your changes.
- Test your changes.
- Submit a pull request.
Pyhunt is licensed under the MIT License. See the LICENSE file for more details.
For any questions or feedback, feel free to reach out:
- GitHub: N22z
- Email: [email protected]
Download the latest release here!
We would like to thank all contributors and the open-source community for their support. Your contributions make projects like Pyhunt possible.
For more information on logging in Python, you can check the official Python documentation on logging.
In future versions, we plan to add more features such as:
- Integration with external logging services.
- Enhanced visualization tools for better analysis.
- More customization options for log formatting.
Stay tuned for updates!
Thank you for choosing Pyhunt! Happy coding!