Skip to main content

Dependency injection without the boilerplate.

Project description

AnySync

PyPI - Version License: MIT

A lightweight library for allowing async functions to be called in a synchronous manner.

import asyncio
from anysync import anysync


@anysync
async def f():
    return 42


assert f().run() == 42


async def main():
    assert await f() == 42


asyncio.run(main())

Just pip install anysync and you're good to go!

Documentation

For more information, please see the documentation.

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

anysync-1.0.1.tar.gz (10.7 kB view details)

Uploaded Source

Built Distribution

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

anysync-1.0.1-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file anysync-1.0.1.tar.gz.

File metadata

  • Download URL: anysync-1.0.1.tar.gz
  • Upload date:
  • Size: 10.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.3

File hashes

Hashes for anysync-1.0.1.tar.gz
Algorithm Hash digest
SHA256 41a2c7ecc4aa9b5e7406185a37e17e8dc4cc76d8671156a1836fe6a41edce135
MD5 d8060a30081fc149a4346c0d142328a9
BLAKE2b-256 8398e734228c438d977650fa3f05ca875b2e848a0c668f14a0e9bfcb10bea11a

See more details on using hashes here.

File details

Details for the file anysync-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: anysync-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 6.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.3

File hashes

Hashes for anysync-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1eef116839d68630af49fc89e40eb4753b21772a04d682ca24137ce033094ec4
MD5 81612a5f58cb96d413299c8583878406
BLAKE2b-256 724d6865fca134eeb8afd181da3eebf150fd2f882578a2b12529aa0e55505007

See more details on using hashes here.

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