Utilities for Python
Project description
Wutils
WRedis is a library for specific functions for various Python projects.
Description
WRedis simplifies code reuse in Python projects. The library offers a number of modules that make using modules easier and simpler.
Installation
To install the library, use pip:
pip install wutils
Description
The wutils library offers a number of general-purpose modules.
License
MIT
This project is licensed under the MIT License. See the LICENSE file for details.
Examples
This directory contains a collection of examples that demonstrate the usage of various modules and functionalities in this project. Each subfolder corresponds to a specific module and includes example scripts to help you understand how to use that module.
Directory Structure
The examples are organized as follows:
examples/
periodic_task/
one_task.py
How to Use
- Navigate to the module folder of interest, e.g.,
examples/module1/. - Open the
README.mdin that folder to get detailed information about the examples. - Run the scripts directly using:
python example1.py
Modules and Examples
periodic_task
Description
This module demonstrates specific functionalities.
- one_task.py: Example demonstrating functionality.
import time
from wutils.periodic_task import PeriodicTask
def my_firts_periodic_function():
print("Running my_firts_periodic_function task...")
def my_second_periodic_function():
print("Running my_second_periodic_function task...")
# Create the periodic task with a 5-second interval and verbose logging enabled
task = PeriodicTask(5, my_firts_periodic_function, verbose=True)
# Start the task
task.start()
# Wait for some time and stop the task
time.sleep(15)
task.stop()
# Create another task with verbose logging disabled
silent_task = PeriodicTask(2, my_second_periodic_function, verbose=False)
silent_task.start()
time.sleep(10)
silent_task.stop()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wiliutils-0.1.0.tar.gz.
File metadata
- Download URL: wiliutils-0.1.0.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
41a1b060def9e4cfe0f730f1ed48f6a85be2edd148d0083cae81ea36e86d5d8f
|
|
| MD5 |
99649240310c9feece7d35739725c1d2
|
|
| BLAKE2b-256 |
8bef1a8efd45ba66edb75d2d07c3075c435d329d2c0f0c582636e1f8141f0e19
|
File details
Details for the file wiliutils-0.1.0-py3-none-any.whl.
File metadata
- Download URL: wiliutils-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a1fec4541440ccfa1c70e807f087bfc3a2db1165cb563f5e8b9c9c4f2e8b11ec
|
|
| MD5 |
0a8021114be69b4ea10479fc3bbe7c91
|
|
| BLAKE2b-256 |
b1cadaa55f215cec920c5d3ffd0fa02a113d3c721e58c9e183cc772ebba98b42
|