Skip to main content

Whiterose Timing Library

Project description

Whiterose

Whiterose is a pure Python library built to return the current time in real-time within a single stdout. This Python library does not require any external libraries. This project is still in a semi-WIP state.

Installation

You can install this library via Pypi:

pip3 install whiterose

Usage

A script has been provided for testing the currently functionality of the library.

$ python3 example.py

Options

timer_s() - Time updates in real-time every second

timer_m() - Time updates in real-time every minute

timer_h() - Time updates in real-time every hour

Examples

You can call the library by using this syntax. This example will print the time to the console every second.

from whiterose.whiterose import Whiterose

wr = Whiterose()

def one_s_timer():
    wr.timer_s(1) # Real-time timer ever 1 second

if __name__ == '__main__':
    one_s_timer()

This example will print the time to the console every 4 seconds.

from whiterose.whiterose import Whiterose

wr = Whiterose()

def one_s_timer():
    wr.timer_s(4) # Real-time timer ever 4 seconds

if __name__ == '__main__':
    one_s_timer()

This example will print the time to the console every 2 minutes.

from whiterose.whiterose import Whiterose

wr = Whiterose()

def one_m_timer():
    wr.timer_m(2) # Real-time timer ever 2 minutes

if __name__ == '__main__':
    one_m_timer()

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

whiterose-0.1.6.tar.gz (2.8 kB view hashes)

Uploaded Source

Built Distribution

whiterose-0.1.6-py3-none-any.whl (3.2 kB view hashes)

Uploaded Python 3

Supported by

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