biothings.hub.dataexport

biothings.hub.dataexport.ids

biothings.hub.dataexport.ids.export_ids(col_name)[source]

Export all _ids from collection named col_name. If col_name refers to a build where a cold_collection is defined, will also extract _ids and sort/uniq them to have the full list of _ids of the actual merged (cold+hot) collection Output file is stored in DATA_EXPORT_FOLDER/ids, defaulting to <DATA_ARCHIVE_ROOT>/export/ids. Output filename is returned as the end, if successful.

biothings.hub.dataexport.ids.upload_ids(ids_file, redirect_from, s3_bucket, aws_key, aws_secret)[source]

Upload file ids_file into s3_bucket and modify redirect_from key’s metadata so redirect_from link will now point to ids_file redirect_from s3 key must exist.