Skip to main content

Clocky

Clocky is a pseudo-port of GNU Time, written in Python. The output generally looks like time.

Certain format codes may not work exactly like they do in GNU time.

Installation

This will install the clocky cli:

pip install clocky

Usage

Clocky can be run via clocky or python -m clocky

usage: clocky [-h] [-p] [-o OUTPUT] [-f FORMAT] [-a] [-v] [-q] [-V] [-g] ...

A pseudo-port of GNU time to Python. You can look at the man page of time to
get some info about the args here. Certain format codes are not supported and
will return a ? in place of an actual value.

positional arguments:
  cmd                   The command to time.

options:
  -h, --help            show this help message and exit
  -p                    Use the portable output format.
  -o OUTPUT, --output OUTPUT
                        Do not send the results to stderr, but overwrite the
                        specified file.
  -f FORMAT, --format FORMAT
                        Specify output format, possibly overriding the format
                        specified in the environment variable TIME.
  -a, --append          (Used together with -o.) Do not overwrite but append.
  -v, --verbose         Give very verbose output about all the program knows
                        about.
  -q, --quiet           Don't report abnormal program termination (where
                        command is terminated by a signal) or nonzero exit
                        status.
  -V, --version         Print version information on standard output, then
                        exit successfully.
  -g                    A clocky-specific extension. When set, tries to act
                        similar to gnu time in terms of output. Otherwise by
                        default (without -f) clocky acts like bash's time
                        command.

Simple Example

Clocky can be used to time function execution (just like the time command):

> clocky echo "Hello World"
Hello World

real    0m0.007s
user    0m0.000s
sys     0m0.000s

Metadata

Release files for clocky 0.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for clocky 0.0.7
File Size Uploaded
clocky-0.0.7.tar.gz 7.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for clocky 0.0.7
File Interpreter ABI Platform
clocky-0.0.7-py3-none-any.whl Python 3 none any Details

Total release size: 15.0 kB

Release files / clocky-0.0.7.tar.gz

Download URL clocky-0.0.7.tar.gz
Size 7.2 kB
Tags Source
SHA-256 checksum
How to use checksums
f13cf3313386a496837d4e8fe492060f878a2efa3b62a589a090a776a2d66fd8
BLAKE2b-256 checksum
How to use checksums
f320b08ff0989c0c83302df2a9544ac712fa30fc48baf314d6d3ef108aef742d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.3

Release files / clocky-0.0.7-py3-none-any.whl

Download URL clocky-0.0.7-py3-none-any.whl
Size 7.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0f81b4f33407e41aa808a0e11ea589a55f9db4ed781fe5a501a33de1752d8fe0
BLAKE2b-256 checksum
How to use checksums
4f873764e22df4e0811b4af1d3add4b66c836d2ebd438a9e5ddaaa046241783d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.3

Release history Release notifications | RSS feed

This release

0.0.7 This release

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page