Skip to main content

Darr

Github CI Status PyPi version Conda Forge Codecov Badge Docs Status Zenodo Badge

Darr is a Python science library that allows you to work efficiently with potentially very large, disk-based Numpy arrays that are widely readable and self-documented. Documentation includes copy-paste ready code to read arrays in many popular data science languages such as R, Julia, Scilab, IDL, Matlab, Maple, and Mathematica, or in Python/Numpy without Darr. Without exporting them and with minimal effort.

Universal readability of data is a pillar of good scientific practice. It is also generally a good idea for anyone who wants to flexibly move between analysis environments, who wants to save data for the longer term, or who wants to share data with others without spending much time on figuring out and/or explaining how the receiver can read it. No idea how to read your 7-dimensional uint32 numpy array in Matlab to quickly try out an algorithm your colleague wrote? No worries, a quick copy-paste of code from the array documentation is all that is needed to read your data in, e.g. R or Matlab (see example). As you work with your array, its documentation is automatically kept up to date. No need to export anything, make notes, or to provide elaborate explanation. No looking up things. No dependence on complicated formats or specialized libraries for reading you data elsewhere later.

In essence, Darr makes it trivially easy to share your numerical arrays with others or with yourself when working in different computing environments, and stores them in a future-proof way.

More rationale for a tool-independent approach to numeric array storage is provided here.

Under the hood, Darr uses NumPy memory-mapped arrays, which is a widely established and trusted way of working with disk-based numerical data, and which makes Darr fully NumPy compatible. This enables efficient out-of-core read/write access to potentially very large arrays. In addition to automatic documentation, Darr adds other functionality to NumPy’s memmap, such as easy the appending and truncating of data, support for ragged arrays, the ability to create arrays from iterators, and easy use of metadata. Flat binary files and (JSON) text files are accompanied by a README text file that explains how the array and metadata are stored (see example arrays).

See this tutorial for a brief introduction, or the documentation for more info.

Darr is currently pre-1.0, and still undergoing development. It is open source and freely available under the New BSD License terms.

Features

  • Data is stored purely based on flat binary and text files, maximizing universal readability.

  • Automatic self-documention, including copy-paste ready code snippets for reading the array in a number of popular data analysis environments, such as Python (without Darr), R, Julia, Scilab, Octave/Matlab, GDL/IDL, and Mathematica (see example array).

  • Disk-persistent array data is directly accessible through NumPy indexing and may be larger than RAM

  • Easy and efficient appending of data (see example).

  • Supports ragged arrays.

  • Easy use of metadata, stored in a widely readable separate JSON text file (see example).

  • Many numeric types are supported: (u)int8-(u)int64, float16-float64, complex64, complex128.

  • Integrates easily with the Dask library for out-of-core computation on very large arrays.

  • Minimal dependencies, only NumPy.

Limitations

  • No structured (record) arrays supported yet, just ndarrays

  • No string data, just numeric.

  • No compression, although compression for archiving purposes is supported.

  • Uses multiple files per array, as binary data is separated from text documentation and metadata. This can be a disadvantage in terms of storage space if you have very many very small arrays.

Installation

Darr officially depends on Python 3.9 or higher. Older versions may work (probably >= 3.6) but are not tested.

Install Darr from PyPI:

$ pip install darr

Or, install Darr via conda:

$ conda install -c conda-forge darr

To install the latest development version, use pip with the latest GitHub master:

$ pip install git+https://github.com/gbeckers/darr@master

Documentation

See the documentation for more information.

Contributing

Any help / suggestions / ideas / contributions are welcome and very much appreciated. For any comment, question, or error, please open an issue or propose a pull request.

Other interesting projects

If Darr is not exactly what you are looking for, have a look at these projects:

Darr is BSD licensed (BSD 3-Clause License). (c) 2017-2024, Gabriël Beckers

Metadata

Release files for darr 0.6.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for darr 0.6.4
File Size Uploaded Provenance Actions
darr-0.6.4.tar.gz 305.7 kB With provenance Details for darr-0.6.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for darr 0.6.4
File Interpreter ABI Platform Actions
darr-0.6.4-py3-none-any.whl Python 3 none any Details for darr-0.6.4-py3-none-any.whl

Total release size: 351.8 kB

Release files / darr-0.6.4.tar.gz

Download URL darr-0.6.4.tar.gz
Size 305.7 kB
Tags Source
SHA-256 checksum
How to use checksums
1231052dd0dd1c429ef69b2bb9fae476411d1d33eef9d253037537276c5f0571
BLAKE2b-256 checksum
How to use checksums
c8b4a2bdc31ab552c10469014ce6eef5e74249d0e89251781a10f8d56d3daa67
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

Release files / darr-0.6.4-py3-none-any.whl

Download URL darr-0.6.4-py3-none-any.whl
Size 46.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dfa8d207196277f46552807b84b04b91e09e6137e5c618cc5b2d2acbeb077d42
BLAKE2b-256 checksum
How to use checksums
362011748aa1a3c15909cfe9007b99eea9fa34beb7d4a21528fd88e0a8dc18ca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

Security for darr 0.6.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for darr-0.6.4.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page