Asynchronous file system operations using io_uring
Project description
async-fs
async-fs
is a powerful C++ extension for Python that provides asynchronous file system operations using liburing
for high-performance I/O. This extension allows you to perform read, write, delete, copy, move, and file information retrieval operations asynchronously, making it an ideal choice for applications requiring high efficiency.
Features
- Asynchronous File Reading: Read data from files without blocking the main thread.
- Asynchronous File Writing: Write data to files asynchronously, ensuring high performance.
- Asynchronous File Deletion: Delete files without blocking, useful for managing temporary files.
- Asynchronous File Copying: Copy the contents of one file to another asynchronously.
- Asynchronous File Moving: Move files from one location to another without blocking.
- Asynchronous File Information Retrieval: Get file information such as size, last modification time, and access permissions.
Installation
Before installing async-fs
, ensure that the liburing
library is installed.
Installing liburing
On Ubuntu/Debian:
sudo apt install liburing-dev
On Fedora:
sudo dnf install liburing-devel
On Arch Linux:
sudo pacman -S liburing
Installing async-fs
Once liburing
is installed, you can install async-fs
via pip:
pip install async-fs
Usage
Here's an example of using async-fs
for asynchronous file reading and writing:
import asyncio
import async_fs
async def main():
# Asynchronous file reading
content = await async_fs.read_file('test.txt', 1024)
print(content)
# Asynchronous file writing
result = await async_fs.write_file('output.txt', 'Hello, async world!')
print(f"Bytes written: {result}")
# Asynchronous file deletion
await async_fs.delete_file('output.txt')
# Asynchronous file copying
await async_fs.copy_file('test.txt', 'copy_test.txt')
# Asynchronous file moving
await async_fs.move_file('copy_test.txt', 'moved_test.txt')
# Asynchronous file information retrieval
info = await async_fs.file_info('moved_test.txt')
print(info)
asyncio.run(main())
Contributing
We welcome contributions from the community! If you have ideas for improving async-fs
, please create an issue or submit a pull request. We appreciate your suggestions and enhancements.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Acknowledgements
I would like to express my gratitude to the following tools and platforms that greatly contributed to the development of this project:
- ChatGPT and OpenAI — for providing powerful AI assistance and generating insights and code suggestions that accelerated the development process.
- Cursor IDE — for offering a seamless and efficient coding environment that helped improve the speed and quality of the project's development.
- JetBrains — for their comprehensive suite of development tools and IDEs, which significantly enhanced productivity and code management throughout the project.
These tools and platforms played an essential role in making this project possible, and I am truly grateful for their contributions.
I also want to extend a big thank you to everyone who supports and contributes to this project. Your help continues to make async-fs
better!
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 Distributions
Built Distributions
File details
Details for the file async_fs-0.0.1-cp313-cp313-musllinux_1_2_x86_64.whl
.
File metadata
- Download URL: async_fs-0.0.1-cp313-cp313-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 1.0 MB
- Tags: CPython 3.13, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cea5dc25199c29f3dea869a3b5806b5d5827de712c09d2f0e6b5b27971f68eac |
|
MD5 | 6d320070f86ba2fd4ca3f1aad2f0bd1c |
|
BLAKE2b-256 | 723d9fe874a53443fea20ee772704bf911c845d6b162cce845bfe881ecb2bfdf |
File details
Details for the file async_fs-0.0.1-cp313-cp313-musllinux_1_2_i686.whl
.
File metadata
- Download URL: async_fs-0.0.1-cp313-cp313-musllinux_1_2_i686.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.13, musllinux: musl 1.2+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 346ddba714e2226166cce0a0c72b2a098e57f3cfe8f770fbcac77b0291b54b1b |
|
MD5 | ce6958332d773936b548df3df786c5ec |
|
BLAKE2b-256 | 9f4169004c92ae70a2b667d96d2c25e8fbdfaff19312e4f3708be95896c82ca3 |
File details
Details for the file async_fs-0.0.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: async_fs-0.0.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 59.4 kB
- Tags: CPython 3.13, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 73a4c3f36fbafb9883e613fe8bd87305742fb1788c490b2a5eefc148cf0a5579 |
|
MD5 | 76a1ba6c57a02f269c5ec846e5882559 |
|
BLAKE2b-256 | b77f65efc7a0f4c4681a27b3346797f34b6097a4cd82698c3881683f16847e60 |
File details
Details for the file async_fs-0.0.1-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl
.
File metadata
- Download URL: async_fs-0.0.1-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl
- Upload date:
- Size: 56.9 kB
- Tags: CPython 3.13, manylinux: glibc 2.17+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 15a469ee57e4c0cea940b4faf778b0b27cdd003c473a2530efaf3380c4357d26 |
|
MD5 | 9c84a89bc0859c78c8fb76f25f104228 |
|
BLAKE2b-256 | 5c6d83c8a6d45a77c76837b08d9c66109cc4a5387973c5da0bbda90d44188499 |
File details
Details for the file async_fs-0.0.1-cp312-cp312-musllinux_1_2_x86_64.whl
.
File metadata
- Download URL: async_fs-0.0.1-cp312-cp312-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 1.0 MB
- Tags: CPython 3.12, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d27fb3089e8242f0dc27ed1ed6b76015787bfefd245b1ae7beded9478573beb4 |
|
MD5 | 57cae33e45d7d4e8198bdfa295776c6b |
|
BLAKE2b-256 | e6c6bd10358e168f7a72023042996c82c0c0c63e23f5169f4674e662a7eaef26 |
File details
Details for the file async_fs-0.0.1-cp312-cp312-musllinux_1_2_i686.whl
.
File metadata
- Download URL: async_fs-0.0.1-cp312-cp312-musllinux_1_2_i686.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.12, musllinux: musl 1.2+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e0de13673edc0d419b8a4250693d3835e2ab545b3b2376d70b12f0bf50227fed |
|
MD5 | cc30ebc739020ac0adf746112805433f |
|
BLAKE2b-256 | d51cca948ed8dda8ecb3c985a299a871ca6d3432efcda590f44ceb501e765f2c |
File details
Details for the file async_fs-0.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: async_fs-0.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 59.5 kB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 416f8ade58557bb595fc1df6225266e3333099859f63a7e434ee99610d66d8f6 |
|
MD5 | 7f0cb39bb13e714b7e664f445f3050f8 |
|
BLAKE2b-256 | 01c6a3a6926934e1648134bedd71e5617a90c2f7b765f1416d2d1b960216a16d |
File details
Details for the file async_fs-0.0.1-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl
.
File metadata
- Download URL: async_fs-0.0.1-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl
- Upload date:
- Size: 57.0 kB
- Tags: CPython 3.12, manylinux: glibc 2.17+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f836a80957629bac6e6242b08d4e83cba6e77f41c5dac1ceb9503de933eb1b15 |
|
MD5 | fe14b1899090ccb0eb7941b40be2457a |
|
BLAKE2b-256 | a21161469d1662fcc24f5d6e53ac9bd4521c0d6a04f19b53886916f686a2627e |
File details
Details for the file async_fs-0.0.1-cp311-cp311-musllinux_1_2_x86_64.whl
.
File metadata
- Download URL: async_fs-0.0.1-cp311-cp311-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 1.0 MB
- Tags: CPython 3.11, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 79ca136724ec9f53109b35065fba78328369df935fda4e9a9fa6beb28950e73a |
|
MD5 | caff256a165c8d52242ed67c6c8a58a9 |
|
BLAKE2b-256 | 623110098ff5ceb239d7ed3a7b38a9efb8db511f71eb22262a523589c8fcee9e |
File details
Details for the file async_fs-0.0.1-cp311-cp311-musllinux_1_2_i686.whl
.
File metadata
- Download URL: async_fs-0.0.1-cp311-cp311-musllinux_1_2_i686.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.11, musllinux: musl 1.2+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ea2a768a2928b858cc9ad84311c3e2687ea8fbbec7c38e3ac3f290993f8cf7d4 |
|
MD5 | 127312e574cc6f648dc82211fa2f08f4 |
|
BLAKE2b-256 | 3b531d978dc38f1f066ae7a6bce28af57726360cec79e9ae88a650142112c8f5 |
File details
Details for the file async_fs-0.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: async_fs-0.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 59.3 kB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e78f961e4109547bc3a638c6b75efbe2d2a03cc2ee6394a3f88d17b7423df2b |
|
MD5 | 15fdc15827659856b471b1628a2d1d18 |
|
BLAKE2b-256 | 9b3d434f34e450002c3c2acfd03b4df509c7e1a5ff275522316ab4ade7421d4a |
File details
Details for the file async_fs-0.0.1-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl
.
File metadata
- Download URL: async_fs-0.0.1-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl
- Upload date:
- Size: 56.8 kB
- Tags: CPython 3.11, manylinux: glibc 2.17+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | aa6d8766442675507298361a15f9f7362d68eef0524856fd7bab7be008a1fe2a |
|
MD5 | c7f9717fcb55bdaeaec38b9f9bb02b1c |
|
BLAKE2b-256 | 4b5de92d9c7462ef77a3f57be8172754014c0c814e7f4b2c59aea96282f8939f |