Metadata-Version: 2.4
Name: light-util
Version: 0.0.1
Summary: A utility package for Python projects, providing decorators and other utilities.
Project-URL: Homepage, https://github.com/zzhdbw/light-util
Author-email: Zhihao Zhang <2578503482@qq.com>
License: MIT License
        
        Copyright (c) 2025 Zhihao Zhang
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.3
Description-Content-Type: text/markdown

<a id="readme-top"></a>

<!-- PROJECT LOGO -->
<br />
<div align="center">
  <a href="https://github.com/zzhdbw/light-util">
    <img src="asset/logo.png" alt="Logo" width="80" height="80">
  </a>

  <h3 align="center">light-util</h3>

  <p align="center">
    An light util for python development !
    <br />
  </p>
</div>



<!-- TABLE OF CONTENTS -->
<details>
  <summary>Table of Contents</summary>
  <ol>
    <li>
      <a href="#about-the-project">About The Project</a>
    </li>
    <li>
      <a href="#getting-started">Getting Started</a>
      <ul>
        <li><a href="#installation">Installation</a></li>
      </ul>
    </li>
    <li><a href="#usage">Usage</a></li>
    <li><a href="#license">License</a></li>
    <li><a href="#contact">Contact</a></li>
  </ol>
</details>



<!-- ABOUT THE PROJECT -->
## About The Project

light-util is a library that provides lightweight tools for Python development.

<p align="right">(<a href="#readme-top">back to top</a>)</p>

<!-- GETTING STARTED -->
## Getting Started
You can use it easyly.

### Installation

You can install it from pypi by pip.
```
pip install light-util
```
<p align="right">(<a href="#readme-top">back to top</a>)</p>

<!-- USAGE EXAMPLES -->
## Usage

light-util can be used for both synchronous and asynchronous functions.  
You can easily use light-util with a decorator.
```
from light_util import get_time
import time
import asyncio

if __name__ == "__main__":
    @get_time
    async def async_example_function(n):
        time.sleep(2)  # Simulate a delay
        # raise ValueError("An example error")
        return 1
    
    @get_time
    def example_function(n):
        time.sleep(2)  # Simulate a delay
        # raise ValueError("An example error") 
        return 1
    
    import asyncio
    asyncio.run(async_example_function(1000000))    
    example_function(1000000)
    # function [async_example_function] execution elapsed: 2.002s
    # function [example_function] execution elapsed: 2.002s
```

<p align="right">(<a href="#readme-top">back to top</a>)</p>



<!-- LICENSE -->
## License

Distributed under the Unlicense License. See `LICENSE` for more information.

<p align="right">(<a href="#readme-top">back to top</a>)</p>



<!-- CONTACT -->
## Contact

Zhihao Zhang - 2578503482@qq.com

Project Link: [https://github.com/zzhdbw/light-util](https://github.com/zzhdbw/light-util)

<p align="right">(<a href="#readme-top">back to top</a>)</p>





