Skip to main content

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

Release files for harrys-toolbox 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for harrys-toolbox 1.0.1
File Interpreter ABI Platform
harrys_toolbox-1.0.1-py3-none-any.whl Python 3 none any Details

Release files / harrys_toolbox-1.0.1-py3-none-any.whl

Download URL harrys_toolbox-1.0.1-py3-none-any.whl
Size 4.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
630b5c544c9722ce248c114ee066932ead60e66801b8937cf60f347bb8f2f86e
BLAKE2b-256 checksum
How to use checksums
b2b37d82ae6e7a0b4acc584abbba6c2a952a387e05320ca78693a98f68caef63
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Release history Release notifications | RSS feed

This release

1.0.1 This release

1 release file

1.0.0

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page