INNER CODE UNIT · Python

download_json

steineggerlab/foldcomp · foldcomp/setup.py:80

async def download_json(url):
    async with httpx.AsyncClient(follow_redirects=True) as client:
        response = await client.get(url)
        return response.json()


# def list():
#     return asyncio.run(download_json("https://foldseek.steineggerlab.workers.dev/manifest.json"))


def setup(db="afdb_swissprot", download_chunks=16):
    for i in ["", ".index", ".dbtype", ".lookup", ".source"]:
        asyncio.run(
            download(
                f"https://opendata.mmseqs.org/foldcomp/{db}{i}",
                f"{db}{i}",
                chunks=download_chunks,
            )

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…