Skip to main content

A living example of superfunctions

Project description

supertime: a living example of the superfunctions

Downloads Downloads Coverage Status Lines of code Hits-of-Code Test-Package Python versions PyPI version Checked with mypy Ruff

The transfunctions library introduces a new type of function: superfunction. They can behave both as regular and asynchronous functions, depending on the context, that is, on how the user uses them. This micro-library demonstrates the smallest example of this concept that I could come up with.

Install it:

pip install supertime

And try:

from asyncio import run
from supertime import supersleep

supersleep(5)  # sleeps 5 sec.
run(supersleep(5))  # sleeps 5 sec., but ASYNCHRONOUSLY.

As you can see, the superfunction can automatically adjust to how the calling code uses it.

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

supertime-0.0.2.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

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

supertime-0.0.2-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file supertime-0.0.2.tar.gz.

File metadata

  • Download URL: supertime-0.0.2.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for supertime-0.0.2.tar.gz
Algorithm Hash digest
SHA256 ee244b73e1e9103e8335c1a7d2d0e96456396f20189559ead2c3b4e67fb2af3e
MD5 b121110243dd7c309263912054bf5ff9
BLAKE2b-256 27a1aa3ace0c750a1a779b4f4f13a9354b9b6025c168bd1f9d57dc206a9f3289

See more details on using hashes here.

Provenance

The following attestation bundles were made for supertime-0.0.2.tar.gz:

Publisher: release.yml on pomponchik/supertime

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file supertime-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: supertime-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for supertime-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 00a5fa2c48a0d78b0aabaf32ed171278555a9ef806c437339998909e1221cd5c
MD5 182a66d5931e78ff7f347d12c9e30301
BLAKE2b-256 5d159d2d0e575b83f484bf08177766af6cf77bea8ce3112c8f8571267a925bf7

See more details on using hashes here.

Provenance

The following attestation bundles were made for supertime-0.0.2-py3-none-any.whl:

Publisher: release.yml on pomponchik/supertime

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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