supertime


Namesupertime JSON
Version 0.0.1 PyPI version JSON
download
home_pageNone
SummaryA living example of superfunctions
upload_time2025-08-03 20:53:59
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseNone
keywords context-aware functions superfunctions transfunctions example
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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:

```bash
pip install supertime
```

And try:

```python
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.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "supertime",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "context-aware functions, superfunctions, transfunctions, example",
    "author": null,
    "author_email": "Evgeniy Blinov <zheni-b@yandex.ru>",
    "download_url": "https://files.pythonhosted.org/packages/e8/48/204f5744d3cb62f422c60efe53536735ec94fd2267cfe61cda05a860bb72/supertime-0.0.1.tar.gz",
    "platform": null,
    "description": "# supertime: a living example of the superfunctions\n\nThe [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.\n\nInstall it:\n\n```bash\npip install supertime\n```\n\nAnd try:\n\n```python\nfrom asyncio import run\nfrom supertime import supersleep\n\nsupersleep(5)  # sleeps 5 sec.\nrun(supersleep(5))  # sleeps 5 sec., but ASYNCHRONOUSLY.\n```\n\nAs you can see, the superfunction can automatically adjust to how the calling code uses it.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A living example of superfunctions",
    "version": "0.0.1",
    "project_urls": {
        "Source": "https://github.com/pomponchik/supertime",
        "Tracker": "https://github.com/pomponchik/supertime/issues"
    },
    "split_keywords": [
        "context-aware functions",
        " superfunctions",
        " transfunctions",
        " example"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "ffb942e659da40dabc55541fdc7089c21bef75652a20eb8972c1143af986227b",
                "md5": "a1fb3de240c146e95fc1e31180b06864",
                "sha256": "0484bfdddc59a7a0e6a0472f828b13eafafbc0d35ed4816283f1601bf26e6d74"
            },
            "downloads": -1,
            "filename": "supertime-0.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a1fb3de240c146e95fc1e31180b06864",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 3277,
            "upload_time": "2025-08-03T20:53:58",
            "upload_time_iso_8601": "2025-08-03T20:53:58.160318Z",
            "url": "https://files.pythonhosted.org/packages/ff/b9/42e659da40dabc55541fdc7089c21bef75652a20eb8972c1143af986227b/supertime-0.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "e848204f5744d3cb62f422c60efe53536735ec94fd2267cfe61cda05a860bb72",
                "md5": "47205fb43e99b0fcf5aedd8de0b03a74",
                "sha256": "79d5c08ad209012e7376c9a242588316617e049b90c5491a81174d3596487d86"
            },
            "downloads": -1,
            "filename": "supertime-0.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "47205fb43e99b0fcf5aedd8de0b03a74",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 3121,
            "upload_time": "2025-08-03T20:53:59",
            "upload_time_iso_8601": "2025-08-03T20:53:59.566020Z",
            "url": "https://files.pythonhosted.org/packages/e8/48/204f5744d3cb62f422c60efe53536735ec94fd2267cfe61cda05a860bb72/supertime-0.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-03 20:53:59",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "pomponchik",
    "github_project": "supertime",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "supertime"
}
        
Elapsed time: 1.11836s