aiocsv
What it is and what it does
aiocsv is an async-first CSV library that mirrors Python's standard csv module but integrates with asyncio. It provides four main classes—AsyncReader, AsyncDictReader, AsyncWriter, and AsyncDictWriter—that accept objects with async read() or write() coroutines instead of file-like objects. This allows you to process CSV data without blocking the event loop, making it suitable for I/O-bound applications that need to handle multiple concurrent file operations or integrate CSV processing into larger async workflows.
The library implements its own custom CSV parser for reading (matching CPython's behavior) and wraps the synchronous csv module's serializers for writing. It requires Python 3.10+ and has a single runtime dependency on typing_extensions. The C extension provides performance optimization, though pre-built wheels are available for most platforms; you may need a compiler if your configuration is uncommon.
Use it for:
- Process CSV files concurrently in an async application without blocking the event loop.
- Stream large CSV datasets through an async pipeline while performing concurrent I/O operations.
- Read or write CSV data from/to async sources using objects with async read/write coroutines.
- Build async workflows that parse CSV input and write transformed CSV output simultaneously.
- Handle tab-separated or other delimited formats asynchronously using dialect parameters.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides async-compatible CSV reading and writing using AsyncReader, AsyncDictReader, AsyncWriter, and AsyncDictWriter classes that work with objects exposing async read/write coroutines.
Yes, if you need async CSV I/O in an asyncio application. The library is actively maintained, permissively licensed, has no known vulnerabilities, and offers a drop-in async replacement for the standard csv module. Install friction is moderate due to the C extension, but pre-built wheels cover common platforms. Not necessary if you only need synchronous CSV processing or are not using asyncio.
Install
aiocsv on PyPI
pip
pip install aiocsvuv
uv add aiocsvpoetry
poetry add aiocsvInstalling aiocsv
Before you install
Medium install friction due to a C extension; pre-built wheels cover Python 3.10–3.12 on common platforms (x86_64, ARM, Windows, Linux, macOS), but you may need a C compiler and Python headers if your configuration lacks a pre-built binary. Active maintenance with recent releases.
License in practice
MIT license (permissive); you can use, modify, and distribute aiocsv freely in commercial and private projects with minimal restrictions.
Quickstart
import asyncio
from aiocsv import AsyncReader
async def main():
# Requires an async file object with read(size: int) coroutine
async for row in AsyncReader(asyncfile):
print(row) # row is a list
asyncio.run(main())
Requires Python 3.10+. You must provide an async file object with a read(size: int) coroutine; standard open() will not work.
Verify before relying
- Whether the C extension significantly improves performance over pure-Python alternatives.
- Compatibility with async frameworks beyond asyncio (e.g., Trio, Curio).
- Memory overhead when processing very large CSV files in streaming mode.
- Practical performance characteristics for typical workloads.
Package facts
| License | not declared (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | 1 — typing_extensions |
| Maintenance | actively maintained — 84 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,593,923/month — #3,732 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: aiocsv-1.4.1-cp310-cp310-macosx_10_9_x86_64.whl; aiocsv-1.4.1-cp310-cp310-macosx_11_0_arm64.whl; aiocsv-1.4.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl; aiocsv-1.4.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; aiocsv-1.4.1-cp310-cp310-musllinux_1_2_aarch64.whl; aiocsv-1.4.1-cp310-cp310-musllinux_1_2_x86_64.whl; aiocsv-1.4.1-cp310-cp310-win32.whl; aiocsv-1.4.1-cp310-cp310-win_amd64.whl; aiocsv-1.4.1-cp311-cp311-macosx_10_9_x86_64.whl; aiocsv-1.4.1-cp311-cp311-macosx_11_0_arm64.whl; aiocsv-1.4.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl; aiocsv-1.4.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; aiocsv-1.4.1-cp311-cp311-musllinux_1_2_aarch64.whl; aiocsv-1.4.1-cp311-cp311-musllinux_1_2_x86_64.whl; aiocsv-1.4.1-cp311-cp311-win32.whl; aiocsv-1.4.1-cp311-cp311-win_amd64.whl; aiocsv-1.4.1-cp312-cp312-macosx_10_13_x86_64.whl; aiocsv-1.4.1-cp312-cp312-macosx_11_0_arm64.whl; aiocsv-1.4.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl; aiocsv-1.4.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Keywords: async, asynchronous, csv, tsv
Tags
More Text Processing packages
A drop-in replacement for Python's standard…
permissive · top 100 on PyPI
pyparsingpyparsing provides a library for building text…
permissive · top 1,000 on PyPI
docutilsDocutils converts plaintext documentation in…
unclear · top 1,000 on PyPI
RapidFuzzRapidFuzz provides fast fuzzy string matching…
permissive · top 1,000 on PyPI
tinycss2tinycss2 parses CSS strings into token and…
permissive · top 1,000 on PyPI
llama-parseLlamaParse parses complex documents (PDFs,…
permissive · top 1,000 on PyPI
aiofileProvides asynchronous file I/O operations for…
permissive · top 1,000 on PyPI
aiofilesProvides non-blocking file I/O for asyncio…
permissive · top 1,000 on PyPI
pyorcPyORC reads and writes Apache ORC files using…
permissive · top 15,000 on PyPI
clevercsvCleverCSV detects CSV file dialects…
permissive · top 15,000 on PyPI
unicodecsvDrop-in replacement for Python 2.7's csv module…
permissive · top 5,000 on PyPI
aiorwlockProvides read-write locks for asyncio programs,…
permissive · top 5,000 on PyPI
dataclass-csvReads and writes CSV files using Python…
permissive · top 15,000 on PyPI
backports.csvProvides Python 3's csv module API for Python…
unclear · top 15,000 on PyPI
writer-sdkPython client library for the Writer REST API,…
permissive · top 15,000 on PyPI
dataflows-tabulatorReads and writes tabular data in multiple…
permissive · top 15,000 on PyPI