Only the standard library... but asynchronous!
Project description
aiostdlib
[!WARNING] The library is in the pre-alpha stage. Bugs may exist!
Key Features
- Provides asynchronous version of the standard library;
- The same API as the Python 3.13 standard blocking API;
- Blocking IO is performed in a separate thread.
Getting Started
Installation
The library is available as aiostdlib on PyPI:
pip install aiostdlib
Usage
json
For more, see the documentation.
from aiostdlib import json
async def main() -> None:
with open("aiostdlib.json") as file:
data = await json.load(file)
os
For more, see the documentation.
import sys
from aiostdlib import os
async def main() -> None:
fd = sys.stdout.fileno()
detail = b"Hello, aiostdlib!"
await os.write(fd, detail)
os.path
For more, see the documentation.
from aiostdlib import os
async def main() -> None:
if await os.path.exists("./aiostdlib.txt"):
await os.unlink("./aiostdlib.txt")
tomllib
For more, see the documentation.
from aiostdlib import tomllib
async def main() -> None:
with open("aiostdlib.toml", mode="rb") as file:
data = await tomllib.load(file)
Environment
- If
AIOSTDLIB_CONCURRENT_WORKERSis a positive integer, then no more than the specified number of threads will be used to execute calls asynchronously. If zero, then threading is not used at all. Otherwise, a minimum of32andos.cpu_count() + 4is the limit.
License
MIT License, Copyright (c) 2025 Sergei Y. Bogdanov. See LICENSE file.
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 aiostdlib-0.2.0.tar.gz.
File metadata
- Download URL: aiostdlib-0.2.0.tar.gz
- Upload date:
- Size: 13.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.5 CPython/3.11.0 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
628f406958b9571d7faae0f3780b88216b343221b182fde2a1c1b8bd67ef53b7
|
|
| MD5 |
fd8871b358c8cf520f30c2beb379826d
|
|
| BLAKE2b-256 |
a1285e8b9e4d73a649c8575db09b97186a0cd573e4b865d6266bb494a579c339
|
File details
Details for the file aiostdlib-0.2.0-py3-none-any.whl.
File metadata
- Download URL: aiostdlib-0.2.0-py3-none-any.whl
- Upload date:
- Size: 17.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.5 CPython/3.11.0 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bc2412529c08226384b9ccbc66621c1cc75ea5da114d828ac197c33c5176037c
|
|
| MD5 |
1821ed0b2cc01acfda8b8612549c56f0
|
|
| BLAKE2b-256 |
bff87c9f06436c2815d5262f6200c7974cf2d0749f6e65f9e360c4e98891be32
|