AllenNeuralDynamics / aind-qc-portal

Quality control portal
MIT License
0 stars 0 forks source link

Handle kachery-cloud SHA hashes #27

Open dbirman opened 3 days ago

dbirman commented 3 days ago

import requests import time

timestamp = int(time.time() * 1000)

url = "https://kachery-gateway.figurl.org/api/gateway" headers = { "content-type": "application/json", "user-agent": "AIND-QC-PORTAL (Python; +qc.allenneuraldynamics.org)", } data = { "payload": { "type": "findFile", "timestamp": timestamp, "hashAlg": "sha1", "hash": "8994d165b5f90ed03285685dd725e1e4bd28aa8c", "zone": "default" } }

response = requests.post(url, headers=headers, json=data)

Use the URL as src url for image/video/etc

dbirman commented 3 days ago

1 hour TTL