FineIO: User-friendly sync/async Python execution
Project description
FineIO
FineIO — async foundation library for finesql and fynor.
It provides helpers that work in both sync and async code, making it easy to adopt async gradually.
Installation
pip install fineio
Quick Start
Hello Example
from fineio import hello
# ✅ Sync usage
print(hello()) # -> "fineio is alive!"
# ✅ Async usage
import asyncio
async def main():
print(await hello()) # -> "fineio is alive!"
asyncio.run(main())
How It Works
The same function hello() works in both contexts:
- If called outside an event loop → it runs async code with
asyncio.run()and returns the result directly. - If called inside an event loop → it returns a coroutine, so you can
awaitit.
This dual-mode design makes it possible to:
- Start with synchronous code.
- Move to async gradually without changing APIs.
Roadmap
- ✅
hello()demo function with dual sync/async support. - 🚧 Core utilities for running coroutines from sync code.
- 🚧 Async helpers for finesql (database operations).
- 🚧 Integration with fynor (web framework).
License
This project is licensed under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fineio-0.0.1a2.tar.gz.
File metadata
- Download URL: fineio-0.0.1a2.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ed7d660ab7f54e076028fb291d4f3c9005ad8254dadda3abac5bf1df06183063
|
|
| MD5 |
a63fd63c221cee4b2757d67747651533
|
|
| BLAKE2b-256 |
f46b5337be4d21d4286c6f47c9dbe00f0537fba1b1d9ea1795e038bbd1ba6e02
|
File details
Details for the file fineio-0.0.1a2-py3-none-any.whl.
File metadata
- Download URL: fineio-0.0.1a2-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e88f338d19951569af10080ea992d92aa253d74488e980665e242aafc3e126b7
|
|
| MD5 |
04ab71102a1f06a152fad132d034fe09
|
|
| BLAKE2b-256 |
aadc67d79b54047725999eb376e689596350b40a287f22f13f90ca283a95bb0b
|