{"categories":[{"label":"Application Frameworks","url":"https://skillfed.io/packages/category/software-development-libraries-application-frameworks/6"}],"enrichment":{"capability":"Decorator-based library that runs async functions in an ambient event loop and regular functions in thread or process pools, returning awaitable futures that combine asyncio and concurrent.futures semantics.","skillfed_tags":["asyncio-wrapper","concurrency-abstraction"],"use_cases":["Run blocking I/O operations (file reads, network calls to non-async libraries) concurrently without rewriting them as async.","Execute CPU-bound work in a separate process while keeping async code responsive in the main thread.","Chain async and sync operations together using .then() without manually managing futures or callbacks.","Simplify migration of synchronous codebases by decorating functions without restructuring control flow.","Avoid event loop boilerplate when mixing asyncio with libraries that only support threading or multiprocessing."],"what_it_does":"unsync is a decorator library that abstracts away the complexity of mixing async and synchronous code by automatically managing execution contexts. When you decorate an async function with @unsync, it runs in a background event loop managed by the library; when you decorate a regular function, it runs in a thread pool by default or a process pool if marked cpu_bound=True. All decorated functions return Unfuture objects\u2014a hybrid future type that behaves like both asyncio.Future and concurrent.futures.Future, and can be awaited or blocked on with .result().\n\nThe library is useful when you have synchronous code that doesn't support asyncio (like blocking I/O libraries) but want to run it concurrently alongside async code, or when you want to avoid writing boilerplate event loop setup. It supports chaining operations with .then(), mixing sync and async functions in pipelines, and custom event loop policies like uvloop. The main tradeoff is that you lose explicit control over the event loop and thread/process management\u2014the library handles it implicitly.","worth_installing":"Yes, with conditions. The library solves a real problem\u2014bridging async and sync code without boilerplate\u2014and carries no security vulnerabilities or licensing concerns. However, dormancy since 2021-10-21 and unspecified Python version support mean you should verify compatibility with your target Python version before committing. Best suited for projects that need to integrate legacy synchronous libraries into async codebases and can tolerate a stable but unmaintained dependency."},"id":"unsync","links":{"html":"https://skillfed.io/packages/unsync","md":"https://skillfed.io/packages/unsync.md","pypi":"https://pypi.org/project/unsync/"},"maintenance":{"status":"dormant"},"meta":{"latest_release":"2021-10-21","license_spdx":null,"license_treatment":"permissive","name":"unsync","python_support":"unspecified","summary":"Unsynchronize asyncio"},"popularity":{"monthly_downloads":77296,"position":14539,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"1.4.0"}
