--- id: drissionrecord version: "2.0.1" license: MIT license_treatment: permissive maintenance: active --- # DrissionRecord — 用于记录数据的模块。 License: permissive · Maintenance: active · Downloads: 429.3K/mo ## What it is and what it does DrissionRecord is a Python utility for buffering and writing data to multiple file formats—xlsx, csv, json, jsonl, sqlite, txt, and byte files. It solves the efficiency problem in data collection workflows by caching data in memory and writing it in batches rather than opening and closing files repeatedly. The core Recorder class accepts data via add_data() and flushes it to disk when a threshold is reached or when record() is called. The package is designed for scenarios where frequent file I/O is a bottleneck or where data loss on crash is a risk. It supports multi-threaded writes, automatic header creation from dictionary data, coordinate-based cell writes for spreadsheets, and resumable workflows. A single runtime dependency (openpyxl) keeps the install footprint minimal. Use it for: - Web scraping workflows where data must be saved incrementally to avoid loss on interruption - Batch data export pipelines that need to write millions of records efficiently - Multi-threaded data collection systems writing to a single shared output file - Resumable data jobs using xlsx or csv files as checkpoints - Converting or migrating data between json, csv, and xlsx formats in bulk ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Buffers and writes data to files (xlsx, csv, json, jsonl, sqlite, txt, byte) with caching to reduce I/O overhead and support for multi-threaded writes. Yes, if you need buffered, multi-threaded file writing with low overhead. The package is actively maintained, has no known vulnerabilities, carries a permissive MIT license, and requires only one dependency. Install it for data collection or batch export workflows where I/O efficiency matters; skip it if you only write small amounts of data or use a database. ## Install pip install drissionrecord uv add drissionrecord poetry add drissionrecord ## Installing DrissionRecord Before you install: Low install friction with a single runtime dependency (openpyxl). Package is actively maintained with a recent release. License in practice: MIT license permits unrestricted use, modification, and distribution with only attribution required. Quickstart: from DrissionRecord import Recorder r = Recorder('data.csv') r.add_data([(1, 2, 3), (4, 5, 6)]) r.record() Verify before relying: - Whether automatic data persistence on program crash/exit actually works as described - Performance characteristics when writing millions of records under concurrent load - Whether xlsx cell formatting, images, and links are fully functional in version 2.0.1 ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 429.3K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags data buffering and file writing, multi-threaded file recording, csv xlsx json file writer, data caching to disk, batch data export, concurrent file writes, data persistence utility, data-persistence, batch-export, multi-threaded-io [View on SkillFed](https://skillfed.io/packages/drissionrecord) · [View on PyPI](https://pypi.org/project/drissionrecord/)