An open API service indexing awesome lists of open source software.

https://github.com/a-boring-square/ohmydecorators

This is a python library that as it's name suggests contains over 100+ function decorators for use in your programs
https://github.com/a-boring-square/ohmydecorators

error-handling library python-decorators python-library python3

Last synced: about 2 months ago
JSON representation

This is a python library that as it's name suggests contains over 100+ function decorators for use in your programs

Awesome Lists containing this project

README

        

# About

# Installation
instalation is simple just use the command
```pip install OhMyDecorators```
or
```pip3 install OhMyDecorators```

# Docs

## Concurrency

### RunFunctionInThread
The RunFunctionInThread function takes in the function and the thread timeout time as a float and when you run the function decorated with this that function will get it's own thread

Example:
```
from OhMyDecorators import Concurrency

@Concurrency.RunFunctionInThread(100000)
def Test():
print("Hello World")
```

### RunFunctionOnGpu
The RunFunctionOnGpu function takes in a function and when you run the function decorated with this it will exacute on the gpu

Example:
```
from OhMyDecorators import Concurrency

@Concurrency.RunFunctionOnGpu()
def Test():
print("Hello World")
```