Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

harrys_toolbox-1.0.1-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file harrys_toolbox-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: harrys_toolbox-1.0.1-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

Hashes for harrys_toolbox-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 630b5c544c9722ce248c114ee066932ead60e66801b8937cf60f347bb8f2f86e
MD5 e6ecd7aea925e6a3a2ca904ddcbb3a5c
BLAKE2b-256 b2b37d82ae6e7a0b4acc584abbba6c2a952a387e05320ca78693a98f68caef63

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page