Skip to main content

A collection of convenience functions and classes for Python.

Project description

utilitea

utilitea is a collection of handy Python utilities designed to simplify everyday coding tasks. Whether you need quick data manipulations, system helpers, or streamlined workflow tools, utilitea serves up a refreshing blend of convenience and efficiency.

Depeche

A message transmitting utility.

import time
from utilitea import depeche as dp

if __name__ == "__main__":
    # Example user-defined function for handling messages
	def handle_message(message: str):
		print(message)
    
	updater = dp.StatusUpdater(handle_message)

	msg1 = updater.add_message("First update")
	msg2 = updater.add_message("Second update")
	msg3 = updater.add_message("Third update")
    
	time.sleep(1)  # Simulate delay

	msg1.mark_finished_safely(updater)  # Marks first message as finished
	time.sleep(1)  # Allow processing

	msg2.mark_finished_safely(updater)  # Marks second message as finished
	time.sleep(1)  # Allow processing

	msg3.mark_finished_safely(updater)  # Marks third message as finished
	time.sleep(1)  # Allow processing

	updater.stop()

Semaphore

A signal transmitting utility.

from utilitea import semaphore as sp

if __name__ == "__main__":
    import doctest
    doctest.testmod()

    def handler(data):
        print(f"Received {data}")

    semaphore = sp.Semaphore()
    semaphore.connect("event", handler)
    semaphore.emit("event", "Hello")
    del semaphore

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

utilitea-0.1.1.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

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

utilitea-0.1.1-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file utilitea-0.1.1.tar.gz.

File metadata

  • Download URL: utilitea-0.1.1.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.3

File hashes

Hashes for utilitea-0.1.1.tar.gz
Algorithm Hash digest
SHA256 08c07f1c19e151cb926f606bfdb93b3ffff68a78061a968a6a8f518aecf328b0
MD5 72c1012414f9c99a55ba64ecf12eae43
BLAKE2b-256 2e9f993ebf8191d2a7138e1936f3041120ef89486ad0b86eb68e091e78fe3a72

See more details on using hashes here.

File details

Details for the file utilitea-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: utilitea-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.3

File hashes

Hashes for utilitea-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b0aefe1530834641d57081bfa1ad09feb9cdd2ee9825b615c149a77819fe1822
MD5 5e432edaa666fc3c05eb98738d8be35d
BLAKE2b-256 b3ecb84908fd42eb2d7e9b12ac6a2bb8faa9b9f8cfd1bf291ff11dc0f96fa0e5

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