A living example of superfunctions
Project description
supertime: a living example of the superfunctions
The [transfunctions])https://github.com/pomponchik/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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file supertime-0.0.1.tar.gz
.
File metadata
- Download URL: supertime-0.0.1.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
79d5c08ad209012e7376c9a242588316617e049b90c5491a81174d3596487d86
|
|
MD5 |
47205fb43e99b0fcf5aedd8de0b03a74
|
|
BLAKE2b-256 |
e848204f5744d3cb62f422c60efe53536735ec94fd2267cfe61cda05a860bb72
|
Provenance
The following attestation bundles were made for supertime-0.0.1.tar.gz
:
Publisher:
release.yml
on pomponchik/supertime
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1
-
Predicate type:
https://docs.pypi.org/attestations/publish/v1
-
Subject name:
supertime-0.0.1.tar.gz
-
Subject digest:
79d5c08ad209012e7376c9a242588316617e049b90c5491a81174d3596487d86
- Sigstore transparency entry: 346596060
- Sigstore integration time:
-
Permalink:
pomponchik/supertime@f16307e37cf5c7b179122e86952430cf3cd90b42
-
Branch / Tag:
refs/heads/main
- Owner: https://github.com/pomponchik
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com
-
Runner Environment:
github-hosted
-
Publication workflow:
release.yml@f16307e37cf5c7b179122e86952430cf3cd90b42
-
Trigger Event:
push
-
Statement type:
File details
Details for the file supertime-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: supertime-0.0.1-py3-none-any.whl
- Upload date:
- Size: 3.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
0484bfdddc59a7a0e6a0472f828b13eafafbc0d35ed4816283f1601bf26e6d74
|
|
MD5 |
a1fb3de240c146e95fc1e31180b06864
|
|
BLAKE2b-256 |
ffb942e659da40dabc55541fdc7089c21bef75652a20eb8972c1143af986227b
|
Provenance
The following attestation bundles were made for supertime-0.0.1-py3-none-any.whl
:
Publisher:
release.yml
on pomponchik/supertime
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1
-
Predicate type:
https://docs.pypi.org/attestations/publish/v1
-
Subject name:
supertime-0.0.1-py3-none-any.whl
-
Subject digest:
0484bfdddc59a7a0e6a0472f828b13eafafbc0d35ed4816283f1601bf26e6d74
- Sigstore transparency entry: 346596073
- Sigstore integration time:
-
Permalink:
pomponchik/supertime@f16307e37cf5c7b179122e86952430cf3cd90b42
-
Branch / Tag:
refs/heads/main
- Owner: https://github.com/pomponchik
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com
-
Runner Environment:
github-hosted
-
Publication workflow:
release.yml@f16307e37cf5c7b179122e86952430cf3cd90b42
-
Trigger Event:
push
-
Statement type: