Skip to main content

This package is intended to fetch information on the files that are associated with a given DOI

Project description

DOI-Meta-Retriever

This package lets you download information on files that are behind a DOI.

For now, the implementation is limited to Zenodo, but it can easily be extended by creating more FileFetcher classes that know about the API of other publishers.

Usage

from doi_meta_retriever import resolve_core_data, FileFetcher


core_data = resolve_core_data('your/doi/of/interest')
fetcher = FileFetcher.factory(core_data)
files = fetcher.fetch()

The data is returned as dataclass instances respectively providing the following attributes each:

class CoreData:
    DOI: str
    resolved_url: str
    actual_url: str
    title: str
    publisher: str
    type: str

Note that there is a difference between the URL that the DOI is resolving to and what the respective target platform might do in further resolutions. For Zenodo this means that resolved_url and actual_url will have different values.

class FileRecord:
    key: str
    url: str
    size: int
    checksum: str
    mimetype: str

Example records:

{
  "DOI" : "10.5281/ZENODO.17831177",
  "resolved_url" : "https://zenodo.org/doi/10.5281/zenodo.17831177",
  "actual_url" : "https://zenodo.org/records/17831177",
  "title" : "Real-world energy data of 200 feeders from low-voltage grids with metadata in Germany over two years",
  "publisher" : "Zenodo",
  "type" : "dataset"
}
{
    "key": "feeder_metadata.csv",
    "url": "https://zenodo.org/api/records/17831177/files/feeder_metadata.csv",
    "size": 171296,
    "checksum": "md5:ceea01454d3b03990a19324596228a33",
    "mimetype": "text/csv"
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

doi_meta_retriever-0.1.0.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

doi_meta_retriever-0.1.0-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file doi_meta_retriever-0.1.0.tar.gz.

File metadata

  • Download URL: doi_meta_retriever-0.1.0.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for doi_meta_retriever-0.1.0.tar.gz
Algorithm Hash digest
SHA256 46260aa0c574a2917f23ebc2c86f8124bb41cfa0bb067609a40ad704f111da17
MD5 e8bbabf47258d4b7072b76c32b335405
BLAKE2b-256 3662112d9d1b9380d8317137a881de79f83974b28da39d2e35ad94567d7d691b

See more details on using hashes here.

Provenance

The following attestation bundles were made for doi_meta_retriever-0.1.0.tar.gz:

Publisher: python-workflow.yaml on Cpprentice/doi-meta-retriever

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file doi_meta_retriever-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for doi_meta_retriever-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d4cdbca3e2276d02273f5a8fc7baae3f39ac0a0ab26eaf4632bff9f9897d0abb
MD5 268a5b5868d05a34b6d6231e90232c61
BLAKE2b-256 e51c5a5257746dfb7606b93e7175c29c8df37984f18c2dcaae96db01c8b7d0e7

See more details on using hashes here.

Provenance

The following attestation bundles were made for doi_meta_retriever-0.1.0-py3-none-any.whl:

Publisher: python-workflow.yaml on Cpprentice/doi-meta-retriever

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page