Harry's Toolbox is a collection of lightweight Python utilities. Each designed to simplify a basic task, such as calculating the framerate of a video feed.
Project description
Harry's Toolbox
Harry's Toolbox is a collection of lightweight Python utilities. Each designed to simplify a basic task, such as calculating the framerate of a video feed.
FPS Counter
The FPS Counter module is designed to simplify the process of monitoring the framerate of a video feed.
After creating an instance of the FPSCounter class, the module works by
expanding "to string" function __str__ to measure the time since the __str__
function was last called, and uses this time difference to calculate the frame
rate.
Example Usage
import time
from harrys_toolbox import FPSCounter
fps = FPSCounter()
while True:
# Prints out the framerate of the video
print(fps)
# Delay to represent the processing time of each frame.
time.sleep(0.01)
Terminal Output
FPS: 96.02
Millis
Returns the number of milliseconds since the module was imported, as an integer. This function is based on the Arduino function of the same name.
Example Usage
import time
from harrys_toolbox import millis
while True:
print(millis())
time.sleep(1)
Terminal Output
0
1001
2001
3002
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 Distributions
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 harrys_toolbox-1.0.0-py3-none-any.whl.
File metadata
- Download URL: harrys_toolbox-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fd1f33b09093954d8b3f5994ba330ddc8305ae0ecc47515369d01037f613ea4b
|
|
| MD5 |
dd0fdfb0efd024c894ed23e9139847a9
|
|
| BLAKE2b-256 |
40ec1a7a0fd1ecbe5fb0a7ac8814e879014b2d698cdd57fcfe64b58ee65fad66
|