Download data resources discovered via FAIR Signposting item links.
Project description
signfetch v0.1
Python package focused on downloading data discovered via FAIR Signposting.
Scope
Version 0.1.0 intentionally focuses on one public API:
download_data(target, output_dir=...)
The function discovers item links from the three main Signposting delivery mechanisms:
- HTTP
Linkheaders - HTML
<link>elements - Link Sets discoverable with the
linksetrelation
It then deduplicates discovered data URLs and downloads all unique resources.
Install
pip install .
For development:
pip install -e .[dev]
Example
from pathlib import Path
from signfetch import download_data
result = download_data(
"https://doi.org/10.5281/zenodo.1000000",
output_dir=Path("downloads")
)
print(result.unique_item_count)
for item in result.items:
print(item.url, item.saved_path)
Design notes
Main components:
SignpostingHarvesterdiscoversitemandlinksetlinksLinkHeaderParser,HtmlLinkParser,LinksetParserparse representationsDataDownloaderdownloads discovered resourcesdownload_data()is the small public façade
Docker
Build:
docker build -t signfetch:0.1.0 .
Run tests in the image:
docker run --rm signfetch:0.1.0 pytest
Release flow
Use prerelease first (for example 0.1.1a1) and tag the commit:
git tag v0.1.1a1
git push origin v0.1.1a1
Run CI first. At the end of CI (package-artifact job) you will get the artifact signfetch-package.
Use that CI run ID in the publish workflow input ci_run_id.
Validate package and tag without publishing:
bash scripts/publish_testpypi.sh check
Publish to TestPyPI:
bash scripts/publish_testpypi.sh test
Publish to PyPI:
bash scripts/publish_testpypi.sh prod
Recommendation: one artifact build on Linux is enough here because the package is pure Python (py3-none-any).
Cross-platform safety is still covered by build checks and unit tests on Linux/Windows/macOS in CI.
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.1.1a1.tar.gz.
File metadata
- Download URL: signfetch-0.1.1a1.tar.gz
- Upload date:
- Size: 10.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
54912f4d10b640f6250703b13166601bf1dc3aeef6960b247a2ec4b3b8d502b3
|
|
| MD5 |
c226fe87ae99f0f76ed86aacdae9545a
|
|
| BLAKE2b-256 |
84b4c61b85d887c9fa63dd3c299551047266ae2d426d119ff56415ee0b555453
|
File details
Details for the file signfetch-0.1.1a1-py3-none-any.whl.
File metadata
- Download URL: signfetch-0.1.1a1-py3-none-any.whl
- Upload date:
- Size: 10.2 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 |
16ed5c14eaee764574aedaf89b57dcfdff067bad4d7a6230a4cf849fa4c43b14
|
|
| MD5 |
1dae2708678874e67a208cfe5ff79821
|
|
| BLAKE2b-256 |
850031cb1d070aa9e627f649d7fe7f1887774f692d1788eb883f3be06ec3f830
|