Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Data Director inventory

CI Coverage

dd-inventory describes a dataset's files where they live. It reads every file under a folder and writes a FileInventory, a JSON document of the core contract, that gives for each file:

  • its path relative to the folder;
  • its size and its SHA-256 digest;
  • its media type and every PRONOM identifier it matched, found with fido, and whether the match was by byte signature, container signature or extension only;
  • for a CSV or TSV table, its fields as a Frictionless Table Schema inferred from a sample of rows.

The inventory holds facts about the files and never their content. Research data are not uploaded to Data Director: the researcher adds the inventory to their project instead (Projects). The digests let the files deposited later be shown to be the files described.

$ uv run dd-inventory path/to/dataset -o inventory.json

The package installs two names for the same command, dd-inventory and data-director-inventory, so that uvx data-director-inventory path/to/dataset works. It is published to PyPI and, for trying a release first, TestPyPI (RELEASING.md).

A researcher without a checkout runs it with uvx and attaches the file to a conversation in the app; the user guide's Making an inventory says how.

Hidden files and folders (names beginning with .) are skipped, symbolic links are not followed, and both are counted in inventory_limitations. If fido cannot be loaded, formats are guessed from file extensions and the inventory says so.

The same package runs in a web browser under Pyodide, so that a researcher can describe a folder without installing anything (#367). The inventory it makes there is the command's, except that its inventory_tool_version carries a local version label naming the runtime, such as 0.1.0a3+pyodide.314.0.7; inventory_tool is dd-inventory in both. An inventory whose version has no + label was made by the command. make_inventory detects the runtime, and a caller may pass it in as runtime=. A caller may also pass on_file=, which is called once per file with a FileProgress (its relative path and size, and how many of the files are done), to show progress.

To read an inventory in TypeScript, as the app does to show one to the researcher, use @data-director/inventory in browser/, which is not part of this Python package.

The package does not depend on the contract or any other part of Data Director (System and boundaries). Its tests check what it writes against the contract's FileInventory schema.

Module What it does
scan.py Walks the folder, digests each file and assembles the inventory.
identify.py The one module that calls fido, with the extension fallback.
tables.py Infers a table's fields with Frictionless.
cli.py The dd-inventory command.

Metadata

Release files for data-director-inventory 0.1.0a4

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

Source distribution (sdist)

Source distribution for data-director-inventory 0.1.0a4
File Size Uploaded Provenance Actions
data_director_inventory-0.1.0a4.tar.gz 15.5 kB Without provenance Details for data_director_inventory-0.1.0a4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for data-director-inventory 0.1.0a4
File Interpreter ABI Platform Actions
data_director_inventory-0.1.0a4-py3-none-any.whl Python 3 none any Details for data_director_inventory-0.1.0a4-py3-none-any.whl

Total release size: 27.1 kB

Release files / data_director_inventory-0.1.0a4.tar.gz

Download URL data_director_inventory-0.1.0a4.tar.gz
Size 15.5 kB
Tags Source
SHA-256 checksum
How to use checksums
99191736744e8e222a10cd146b1923f27ebc5b78be900798726696b902d78896
BLAKE2b-256 checksum
How to use checksums
ba45111252b8c6dce903004e40a087fb0c3a86404820515cc217e4a3d54f6b44
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / data_director_inventory-0.1.0a4-py3-none-any.whl

Download URL data_director_inventory-0.1.0a4-py3-none-any.whl
Size 11.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
66142b46f132f07f1a17e57c0c3f3482df5084ce19b6df8b416145a8e32ce4ae
BLAKE2b-256 checksum
How to use checksums
59020cceb14c16d1f6f2ba17addcc66110645a44c461479426c69899e95e89ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for data-director-inventory 0.1.0a4

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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