Skip to main content

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.

Metadata

Release files for pyafiles 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyafiles 0.1.0
File Size Uploaded
pyafiles-0.1.0.tar.gz 2.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyafiles 0.1.0
File Interpreter ABI Platform
pyafiles-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 4.4 kB

Release files / pyafiles-0.1.0.tar.gz

Download URL pyafiles-0.1.0.tar.gz
Size 2.1 kB
Tags Source
SHA-256 checksum
How to use checksums
7861f28653e4ecd3b81f358fd38c47b84fe3a92567e72d585cbccbca50f9890d
BLAKE2b-256 checksum
How to use checksums
55418455898dce2c076325936222b7d27c40d22e1803511d3454d71adcc65c5a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.9

Release files / pyafiles-0.1.0-py3-none-any.whl

Download URL pyafiles-0.1.0-py3-none-any.whl
Size 2.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f7a11bb50d489c28bb6898d0421fcaaaf82a311f7e94d924394f8a232ea2f316
BLAKE2b-256 checksum
How to use checksums
a37fe3c6cd45cafb56eb158b08bd0d0c1dfe6c5f471485b7b3038be0fcf4dc43
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.9

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page