{"id":28542706,"url":"https://github.com/pomponchik/supertime","last_synced_at":"2026-02-01T15:35:16.798Z","repository":{"id":293252981,"uuid":"983406327","full_name":"pomponchik/supertime","owner":"pomponchik","description":"A living example of context-aware functions","archived":false,"fork":false,"pushed_at":"2025-05-14T14:02:24.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-09T21:07:18.498Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pomponchik.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-14T10:36:37.000Z","updated_at":"2025-05-14T10:36:55.000Z","dependencies_parsed_at":"2025-05-14T12:50:37.013Z","dependency_job_id":"21c8a45f-1227-4472-903a-01ded1269084","html_url":"https://github.com/pomponchik/supertime","commit_stats":null,"previous_names":["pomponchik/supertime"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pomponchik/supertime","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pomponchik%2Fsupertime","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pomponchik%2Fsupertime/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pomponchik%2Fsupertime/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pomponchik%2Fsupertime/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pomponchik","download_url":"https://codeload.github.com/pomponchik/supertime/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pomponchik%2Fsupertime/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263864295,"owners_count":23521767,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-09T21:07:19.573Z","updated_at":"2026-02-01T15:35:16.791Z","avatar_url":"https://github.com/pomponchik.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# supertime: a living example of the superfunctions\n\n[![Downloads](https://static.pepy.tech/badge/supertime/month)](https://pepy.tech/project/supertime)\n[![Downloads](https://static.pepy.tech/badge/supertime)](https://pepy.tech/project/supertime)\n[![Coverage Status](https://coveralls.io/repos/github/pomponchik/supertime/badge.svg?branch=main)](https://coveralls.io/github/pomponchik/supertime?branch=main)\n[![Lines of code](https://sloc.xyz/github/pomponchik/supertime/?category=code)](https://github.com/boyter/scc/)\n[![Hits-of-Code](https://hitsofcode.com/github/pomponchik/supertime?branch=main)](https://hitsofcode.com/github/pomponchik/supertime/view?branch=main)\n[![Test-Package](https://github.com/pomponchik/supertime/actions/workflows/tests_and_coverage.yml/badge.svg)](https://github.com/pomponchik/supertime/actions/workflows/tests_and_coverage.yml)\n[![Python versions](https://img.shields.io/pypi/pyversions/supertime.svg)](https://pypi.python.org/pypi/supertime)\n[![PyPI version](https://badge.fury.io/py/supertime.svg)](https://badge.fury.io/py/supertime)\n[![Checked with mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/)\n[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)\n\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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpomponchik%2Fsupertime","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpomponchik%2Fsupertime","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpomponchik%2Fsupertime/lists"}