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.0.tar.gz (10.6 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.0-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for anysync-1.0.0.tar.gz
Algorithm Hash digest
SHA256 ffdb2fad8f9d741eb8b6c611b02688b3d8cdd6645fdc9500c76ae73a7a904024
MD5 5385ed9fa254c4d3466f7d89b04ef6fa
BLAKE2b-256 4cef64b7260e2b86674e346e33199f7a27cff073c75bb42b409949e79e7cc2cc

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for anysync-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 be73a1c0d699b2a225d9c0d8786945256e06c4f2e52f88f870e0b0a3e29e7a8d
MD5 b3398f1551ccdef0d01b148f04dd545e
BLAKE2b-256 d614229bcc77268799e769c3a55f95449b4a3e048d82b89c4d90646cd12bc57d

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