--- id: aiocsv version: "1.4.1" license: unclear license_treatment: permissive maintenance: active --- # aiocsv License: permissive · Maintenance: active · Downloads: 1.6M/mo ## 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 above — 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 pip install aiocsv uv add aiocsv poetry add aiocsv ## Installing 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_current - Install friction: medium - Maintenance: active - Downloads: 1.6M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags async csv reader writer, asynchronous csv parsing, async file csv processing, asyncio csv handling, non-blocking csv operations, async tsv reader, concurrent csv reading, async-io, csv-parsing, data-processing [View on SkillFed](https://skillfed.io/packages/aiocsv) · [View on PyPI](https://pypi.org/project/aiocsv/)