Skip to main content

A simple library for working with timelines and delayed calls

Project description

chronolight

Discord

A simple library for working with timelines and delayed calls.

Installation

pip install chronolight

Quick Start

import chronolight

# Timeline
tl = chronolight.Timeline()
tl.wait(1)
tl.call(lambda: print("1 second passed"))
tl.wait(0.5)
tl.call(lambda: print("Another 0.5 seconds passed"))
tl.run()

# Delayed call
chronolight.delay(2, lambda: print("After 2 seconds"))

Methods

Timeline

Method Description
.wait(seconds) Adds a delay
.call(func) Adds a function call
.run(threaded=False) Runs the timeline

delay(seconds, function)

Executes a function after N seconds (in a separate thread).

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

chronolight-1.0.0.tar.gz (2.1 kB view details)

Uploaded Source

Built Distribution

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

chronolight-1.0.0-py3-none-any.whl (2.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for chronolight-1.0.0.tar.gz
Algorithm Hash digest
SHA256 117092287566bce911ef0194842fd9a9db640a54a164e0b4be5f487f5e4e0725
MD5 038303c211ccd90e1a608fa3ff00adf0
BLAKE2b-256 0ae6a490ee6d47f78f23b28165a8d3627de386b745f7e7bd9b1bff4611971e10

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for chronolight-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 68606aca8135741faa3d4138223b385cf77fad770831bcaffc25e5b4f7138183
MD5 12300a2d4bbdf5b9988ef35e1a1decea
BLAKE2b-256 5c7265ab7678d03bf08b041c4508ac7e6d20107a940d8c4c6656f01b4ace430a

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