Metadata-Version: 2.4
Name: sfps
Version: 0.0.1
Summary: SFPS - Smooth FPS.
Home-page: https://github.com/rathaROG/smooth-fps
Author: Ratha SIV
Maintainer: rathaROG
License: BSD-2-Clause
Keywords: SFPS,FPS,Frame rate,FPS calculator
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Education
Classifier: Topic :: Education :: Testing
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Mathematics
Classifier: Topic :: Software Development
Classifier: Topic :: Software Development :: Libraries
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX
Classifier: Operating System :: Unix
Classifier: Operating System :: MacOS
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: license-file
Dynamic: maintainer
Dynamic: summary

[![Test PyPI Build](https://github.com/rathaROG/smooth-fps/actions/workflows/prepublish.yaml/badge.svg)](https://github.com/rathaROG/smooth-fps/actions/workflows/prepublish.yaml)
[![Publish on PyPI](https://github.com/rathaROG/smooth-fps/actions/workflows/publish.yaml/badge.svg)](https://github.com/rathaROG/smooth-fps/actions/workflows/publish.yaml)

# SFPS - Smooth FPS

`SFPS` is a small and very efficient Python library which helps calculate the real-time computing frame rate with a few lines of code.

You can install from [PyPI](https://pypi.org/project/sfps/):

```
pip install sfps
```

You can import and initialize `SFPS` in your Python code:

```
from sfps import SFPS
sfps = SFPS(nframes=8, interval=1)
```
* `nframes` (`int`, `default=5`) : Number of the last frames, used for averaging.
* `interval` (`int`, `default=1`) : Time interval in second.

And then you can call `fps()` or `raw_fps()` to calculate the real-time frame rate.
```
...
fps = sfps.fps(format_spec='.2f')
...
```

For usage details, please check [`SFPS`](https://github.com/rathaROG/smooth-fps/blob/main/sfps/sfps.py). You can also check an [example here](https://github.com/rathaROG/smooth-fps/blob/main/example).
