skillfed

DrissionRecord

用于记录数据的模块。

drissionrecord v2.0.1 429.3K downloads/30d#6,740 on PyPI
Permissive license MIT Active released

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 on this page — 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

drissionrecord on PyPI

pip

pip install drissionrecord

uv

uv add drissionrecord

poetry

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 the current Python release (>=3.6)
Install friction low — pure-Python wheel
Runtime dependencies 1 — openpyxl
Maintenance actively maintained — 123 days since the last release
First released
Downloads 429,346/month — #6,740 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: drissionrecord-2.0.1-py3-none-any.whl

Keywords: DrissionRecord

Development Status :: 4 - BetaLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3.6Topic :: Utilities

Tags

data buffering and file writingmulti-threaded file recordingcsv xlsx json file writerdata caching to diskbatch data exportconcurrent file writesdata persistence utility
data-persistencebatch-exportmulti-threaded-io

More Utilities packages