Minimal async file I/O wrapper using asyncio
Project description
asyncfiles
A minimal async file I/O library using asyncio and thread pool executors.
Usage
from pyafiles import AsyncFile
import asyncio
async def main():
async with AsyncFile('example.txt', 'w') as f:
await f.write('Hello!')
async with AsyncFile('example.txt', 'r') as f:
data = await f.read()
print(data)
asyncio.run(main())
Features
- Asynchronous file operations using
asyncio. - Supports reading, writing, and appending to files.
- Context manager for automatic resource management.
- Uses thread pool executors for blocking I/O operations.
Installation
You can install the library using pip:
pip install pyafiles
License
This project is licensed under the MIT License. See the LICENSE file for details.
Contributing
Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.
Requirements
- Python 3.7 or higher
Limitations
- This library is designed for simple file operations and may not be suitable for high-performance applications.
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 pyafiles-0.1.0.tar.gz.
File metadata
- Download URL: pyafiles-0.1.0.tar.gz
- Upload date:
- Size: 2.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7861f28653e4ecd3b81f358fd38c47b84fe3a92567e72d585cbccbca50f9890d
|
|
| MD5 |
fd3e11618fcef4837b1aea2f72ada19e
|
|
| BLAKE2b-256 |
55418455898dce2c076325936222b7d27c40d22e1803511d3454d71adcc65c5a
|
File details
Details for the file pyafiles-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pyafiles-0.1.0-py3-none-any.whl
- Upload date:
- Size: 2.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f7a11bb50d489c28bb6898d0421fcaaaf82a311f7e94d924394f8a232ea2f316
|
|
| MD5 |
a6581b409a549f1bed57ad7d06e39784
|
|
| BLAKE2b-256 |
a37fe3c6cd45cafb56eb158b08bd0d0c1dfe6c5f471485b7b3038be0fcf4dc43
|