Skip to main content

Async file io

Project description

drawing

aiopen

Wheel Version py_versions Ruff

Install: pip install aiopen

Async-open

Why not use aiofiles?

  • Wanted more type annotations
  • aiofiles uses ye ole @coroutine decorator -- aiopen uses python3.6+ async/await
  • aiopen is a callable module, so you can do:
    • import aiopen
    • async with aiopen('afile.txt', 'w') as f: await f.write('some text!')
    • async with aiopen('afile.txt', 'r') as f: content = await f.read()

(Big shouts out to the aiofiles people, aiopen is entirely based off of aiofiles)

Usage:

Just import it! The module is also callable!

import aiopen

async with aiopen('afile.txt', 'w') as f:
    await f.write('some text!')

async with aiopen('afile.txt', 'r') as f:
    content = await f.read()
    print(content)

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

aiopen-0.8.1.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

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

aiopen-0.8.1-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file aiopen-0.8.1.tar.gz.

File metadata

  • Download URL: aiopen-0.8.1.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.1

File hashes

Hashes for aiopen-0.8.1.tar.gz
Algorithm Hash digest
SHA256 d6f60de9aa05f41d2d2343b21f51e30fe1b7779d16429708b3c2a2ee4e93cc30
MD5 44b68f0899462e5f9c065f98d805c5cb
BLAKE2b-256 c97fc619cc2ac03c04b2979fb7d162b99059c7f829b65fb4fa4ed0965b96f2bf

See more details on using hashes here.

File details

Details for the file aiopen-0.8.1-py3-none-any.whl.

File metadata

  • Download URL: aiopen-0.8.1-py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.1

File hashes

Hashes for aiopen-0.8.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d863efd2d4262310791cecd92c80ff357304061afd91ffdc05dcc4d6c47dcc97
MD5 a3a7c8a1fd1acb7b5c23378dbca00d61
BLAKE2b-256 b7bc8a22566a3dc8156545ef151a1be7becece9e29ad2a0f42d5efbbd78a2412

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