Skip to main content

A lightweight Python frame counter and limiter library for small projects and simulations.

Project description

Frames

Frames is a lightweight Python frame counter and limiter library.
It provides:

  • Frame rate measurement (FrameCounter)
  • Frame rate limiting (FrameLimit)
  • A convenient singleton Clock for small projects
  • Loop utilities with BREAK sentinel

Installation

pip install frameclock

Usage

from Frames import FrameCounter, FrameLimit, clock, BREAK

# Frame counter
counter = FrameCounter()
print(counter.stamp())

# Frame limiter
limit = FrameLimit(60)
limit.wait(update=True)

# Clock singleton
clock.target_fps(60)
clock.wait(update=True)

Licence

MIT License

Project details


Download files

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

Source Distribution

frameclock-1.0.0.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

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

frameclock-1.0.0-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file frameclock-1.0.0.tar.gz.

File metadata

  • Download URL: frameclock-1.0.0.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for frameclock-1.0.0.tar.gz
Algorithm Hash digest
SHA256 5208d402439b2a6087a167d301b879c40b7f807c17c894b4e8fa153f010aac9b
MD5 0c5dc79a80bf3843bb50b6de45b07b80
BLAKE2b-256 dd849a535f0acc2b02a353d239dfc0e82bb3fb94841e1defbaae9d6eb938b98c

See more details on using hashes here.

File details

Details for the file frameclock-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: frameclock-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for frameclock-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bce98ed1ffcab186e3def38372759dd12a3b54cd6b95bacc5271897bcb44fe5b
MD5 8b452a688a70b571cb6670bfd11965f7
BLAKE2b-256 0e169b04d1262899c9f4ee270b1e7c007de05708e541035359c9a8d1b5a7ebbc

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