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.3.tar.gz (3.6 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.3-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: supertime-0.0.3.tar.gz
  • Upload date:
  • Size: 3.6 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.3.tar.gz
Algorithm Hash digest
SHA256 735ea3216747971fcc41e03f20e7dbabb4232f4c5924ea805280ec6d1ad41c2a
MD5 4f9963d9ea6d0f9101eff6ca31f12f19
BLAKE2b-256 12a34badf4247f71b3e885af2d7c254d11924bf30bc7e3686a6876af0f1266c3

See more details on using hashes here.

Provenance

The following attestation bundles were made for supertime-0.0.3.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.3-py3-none-any.whl.

File metadata

  • Download URL: supertime-0.0.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 2dd87e95d317939926d13af7bb17b5b4b9c1ae96215e0927c1163e8e1a2adf7c
MD5 6d159b5fb9657e04d43f1f45f9a142f0
BLAKE2b-256 a83fd8c029aa4285bdf78ae3ef4fa629979b216f77caaac52e746cf61b44af52

See more details on using hashes here.

Provenance

The following attestation bundles were made for supertime-0.0.3-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