Metadata-Version: 2.4
Name: aiopen
Version: 0.7.1
Summary: Async file io
Author-email: jesse <jessekrubin@gmail.com>
License-Expression: MIT
License-File: LICENSE
Keywords: aiopen,anyio,async,dgpy,fs
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Typing :: Typed
Requires-Python: >=3.9
Requires-Dist: funkify
Requires-Dist: typing-extensions>=4.12.2
Provides-Extra: test
Requires-Dist: anyio>=4.4; extra == 'test'
Requires-Dist: pytest-asyncio>=1.0.0; extra == 'test'
Requires-Dist: pytest>=8.3.2; extra == 'test'
Description-Content-Type: text/markdown

<a href="https://github.com/dynamic-graphics-inc/dgpy-libs">
<img align="right" src="https://github.com/dynamic-graphics-inc/dgpy-libs/blob/main/docs/images/dgpy_banner.svg?raw=true" alt="drawing" height="120" width="300"/>
</a>

# aiopen

[![Wheel](https://img.shields.io/pypi/wheel/aiopen.svg)](https://img.shields.io/pypi/wheel/aiopen.svg)
[![Version](https://img.shields.io/pypi/v/aiopen.svg)](https://img.shields.io/pypi/v/aiopen.svg)
[![py_versions](https://img.shields.io/pypi/pyversions/aiopen.svg)](https://img.shields.io/pypi/pyversions/aiopen.svg)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

**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!

```python
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)
```
