{"id":24394579,"url":"https://github.com/datadavev/zfile","last_synced_at":"2026-04-20T20:03:13.740Z","repository":{"id":272442230,"uuid":"916226058","full_name":"datadavev/zfile","owner":"datadavev","description":"A simple proxy service for published content on Zenodo","archived":false,"fork":false,"pushed_at":"2025-01-14T12:30:17.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-14T13:43:41.276Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/datadavev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-13T17:33:26.000Z","updated_at":"2025-01-14T12:30:20.000Z","dependencies_parsed_at":"2025-01-14T13:43:47.389Z","dependency_job_id":"90988d41-fbf1-4c94-ae1f-553d4dea41bf","html_url":"https://github.com/datadavev/zfile","commit_stats":null,"previous_names":["datadavev/zfile"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datadavev%2Fzfile","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datadavev%2Fzfile/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datadavev%2Fzfile/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datadavev%2Fzfile/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/datadavev","download_url":"https://codeload.github.com/datadavev/zfile/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243330257,"owners_count":20274037,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-19T20:00:51.586Z","updated_at":"2025-12-25T20:56:22.299Z","avatar_url":"https://github.com/datadavev.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# zfile\n\nA simple resolver and partial proxy service for published content on Zenodo.\n\nzfile is a tiny FastAPI service that may help streamline access to published resources on Zenodo by using the resource DOI and a file name in the form of `DOI/filename`. This facilitates ease of reuse of artifacts published on Zenodo.\n\n```mermaid\nsequenceDiagram\n    actor Client\n    Client -\u003e\u003e zfile: 10.5281/zenodo.11400483/stac.json\n    zfile -\u003e\u003e doi.org: 10.5281/zenodo.11400483\n    doi.org -\u003e\u003e zfile: 302: zenodo.org/doi/10.5281/zenodo.11400483\n    zfile -\u003e\u003e zenodo: zenodo.org/doi/10.5281/zenodo.11400483\n    zenodo -\u003e\u003e zfile: Link: \u003chttps://zenodo.org/api/records/11659910\u003e\n    zfile -\u003e\u003e zenodo: /api/records/11659910\n    zenodo -\u003e\u003e zfile: {package json}\n    zfile -\u003e\u003e zfile: find \"stac.json\"\n    zfile -\u003e\u003e Client: 302 /api/records/11659910/files/stac.json/content\n```\n\nGiven a DOI and file name, zfile splits the DOI and file name parts. ZFile resolves the DOI to the Zenodo location using the doi.org service. The Zenodo response at the resolved URL includes a Link header like:\n\n```\nlink: \u003chttps://zenodo.org/api/records/11659910\u003e ; rel=\"linkset\" ; type=\"application/linkset+json\"\n```\n\nWhich indicates that the `linkset+json` representation of the resource is available at the specified URL. zfile sends a GET request to the linkset URL, and retrieves the linkset package in JSON. The linkset is examined for the requested file name, and if present, the client is redirected to that content URL. For file names ending in `.html`, `.js`, or `.css`, the resource is streamed directly to the client with the corresponding resource type. \n\nThis enables resources on Zenodo to be conveniently referenced directly by URL. For example:\n\nhttps://z.rslv.xyz/10.5281/zenodo.14291887/torus.html\n\nversus the content URL for the same resource:\n\nhttps://zenodo.org/api/records/14291887/files/torus.html/content\n\n\n## Operation\n\nzfile may be run locally. To do so, clone this repo, then:\n```\ncd zfile\npoetry run python -m zfile\n```\n\nThe service may then be accessed at http://localhost:4000/\n\nzfile is also deployed on a very resource limited service at: https://z.rslv.xyz. It's availablility depends on use/abuse of the service.\n\n## Usage\n\nThe service API is available at [`/api`](https://z.rslv.xyz/api). Two endpoints are supported:\n\n`/DOI[/FNAME]` to access the resource.\n\nand\n\n`.info/DOI/[FNAME]` to access metadata about the resource.\n\nThe URL pattern is:\n\n```\nDOI[/FNAME]\n\nDOI = The published DOI without embellishments, e.g. \"10.5281/zenodo.11400483\".\nFNAME = The name of a file within the package.\n```\n\nGiven only the DOI for a package, the service returns the linkset metadata from the [Zenodo records API](https://developers.zenodo.org/#records).\n\nIf the DOI and the name of a file within the package is given the service will either redirect to the content URL on Zenodo, or for some specific media_types, will proxy the content.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatadavev%2Fzfile","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdatadavev%2Fzfile","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatadavev%2Fzfile/lists"}