Skip to main content

Only the standard library... but asynchronous!

Project description

aiostdlib

PyPI Version PyPI Downloads License Python Version

[!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_WORKERS is 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 of 32 and os.cpu_count() + 4 is the limit.

License

MIT License, Copyright (c) 2025 Sergei Y. Bogdanov. See LICENSE file.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aiostdlib-0.2.0.tar.gz (13.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aiostdlib-0.2.0-py3-none-any.whl (17.4 kB view details)

Uploaded Python 3

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

Hashes for aiostdlib-0.2.0.tar.gz
Algorithm Hash digest
SHA256 628f406958b9571d7faae0f3780b88216b343221b182fde2a1c1b8bd67ef53b7
MD5 fd8871b358c8cf520f30c2beb379826d
BLAKE2b-256 a1285e8b9e4d73a649c8575db09b97186a0cd573e4b865d6266bb494a579c339

See more details on using hashes here.

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

Hashes for aiostdlib-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bc2412529c08226384b9ccbc66621c1cc75ea5da114d828ac197c33c5176037c
MD5 1821ed0b2cc01acfda8b8612549c56f0
BLAKE2b-256 bff87c9f06436c2815d5262f6200c7974cf2d0749f6e65f9e360c4e98891be32

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page