Download data resources discovered via FAIR Signposting item links.
Project description
signfetch v0.2.0a1
Python package focused on discovering and downloading data via FAIR Signposting.
Scope
Version 0.2.0a1 exposes two public APIs:
list_item_links(target)– discoveritemlinks without downloadingdownload_data(target, output_dir=...)– discover and download data resources
Both functions use FAIR Signposting discovery mechanisms.
The package discovers item links from the three main Signposting delivery mechanisms:
- HTTP
Linkheaders - HTML
<link>elements - Link Sets discoverable with the
linksetrelation
Link sets are automatically retrieved and parsed when present.
Example – discover data resources
You can inspect available data resources without downloading them.
from signfetch import list_item_links
links = list_item_links(
"https://doi.org/10.5281/zenodo.12542566"
)
for link in links:
print(link.url, link.source)
Example – download discovered data
download_data() performs discovery and downloads all discovered resources.
from pathlib import Path
from signfetch import download_data
result = download_data(
"https://doi.org/10.5281/zenodo.12542566",
output_dir=Path("downloads")
)
print(result.unique_item_count)
for item in result.items:
print(item.url, item.saved_path)
Design notes
Main components:
Signposting discovery
SignpostingHarvester– orchestrates discoveryLinkHeaderParser– parses HTTPLinkheadersHtmlLinkParser– parses HTML<link>elementsLinksetParser– parses linkset documents
Downloading
DataDownloader– downloads resources discovered viaitemlinks- downloads are executed concurrently
Public API
list_item_links()– discovery onlydownload_data()– discovery + download
Installation
pip install signfetch
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file signfetch-0.2.0a1.tar.gz.
File metadata
- Download URL: signfetch-0.2.0a1.tar.gz
- Upload date:
- Size: 10.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
588e1d32c274e652227c737dea1614d872743c28416fd50ba85f1a9cfa1998cd
|
|
| MD5 |
4f604e3c43b9ec57c8b0be020e6cc591
|
|
| BLAKE2b-256 |
fdf6122e22b87482b66393da985534f0429caeda1e291ad0c38e4ce27351b2b5
|
File details
Details for the file signfetch-0.2.0a1-py3-none-any.whl.
File metadata
- Download URL: signfetch-0.2.0a1-py3-none-any.whl
- Upload date:
- Size: 9.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
78abb83c0e0670021cf5b3067c81158986f01e3fc0412052210ad9688dc2f834
|
|
| MD5 |
98a06d1c8e787d21a8c68dbd2b628d18
|
|
| BLAKE2b-256 |
a5f2e64a778a24adb1557ace72875f86d7b682cb996fd71aaf69c34163c79bc2
|