Skip to main content

Utility functions

Project description

FifeUtil

Package of Python utilities I find handy.

FifeUtil is the place to keep utilities that I would like to re-use across projects.

Installation

To install directly from GitHub:

python3 -m pip install "git+https://github.com/jmfife/fifeutil.git"

If you have cloned or forked the repo already to your local directory and want to use it in live (editable mode):

python3 -m pip install -e "."

Quickstart

Install the package from GitHub:

python3 -m pip install "git+https://github.com/jmfife/fifeutil.git"

Now we see an example of using the one of the timer utilities that synchronizes events with the hour. First run the Python interpreter, then:

>>> from fifeutil import timing
>>> timer1 = timing.TimerSyncHour(3600/5)
>>> import datetime
>>> def printtime():
...     print(datetime.datetime.now())
... 
>>> timer1.triggercallback(printtime)
2020-05-31 17:25:10.001249
2020-05-31 17:25:15.001348
2020-05-31 17:25:20.000543
2020-05-31 17:25:25.000405

We see the timer triggering at 5-second intervals synchronized with the top of the hour and with the minute in this case.

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

fifeutil-1.0.1.tar.gz (12.9 kB view details)

Uploaded Source

Built Distribution

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

fifeutil-1.0.1-py3-none-any.whl (13.8 kB view details)

Uploaded Python 3

File details

Details for the file fifeutil-1.0.1.tar.gz.

File metadata

  • Download URL: fifeutil-1.0.1.tar.gz
  • Upload date:
  • Size: 12.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.6

File hashes

Hashes for fifeutil-1.0.1.tar.gz
Algorithm Hash digest
SHA256 4d7f5d4bb96355ba607c18a984b18970fce3a37b14645f8d5d9da3686699cafd
MD5 75fb931be620d441275f8cc2f3ed8583
BLAKE2b-256 e35e6dec462860325028bb40b73ef259e360c8660773a0a323a60c98114d09fc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fifeutil-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 13.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.6

File hashes

Hashes for fifeutil-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 70e11f1cf43bed1ef190580a2fc835150f9c7ce5329a515c5c4be4ad96872f4b
MD5 ee261e5c3670a0a9ac0dabce5ceb6c66
BLAKE2b-256 f56d9fd7e567ad27b772d80acbb55052c85451914d3ce4fd1f1ce7a21f6b4621

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