Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

scigantic-alphafold

Latest version: v0.2.0

Overview

Last scanned
29 Nov 2026
Published
29 Nov 2026
PyPI package Publisher: scigantic
0 Stars
0 Forks
4 Versions
326 Downloads
Python Repo language

Scan summary

scigantic-alphafold was last scanned on 29 Nov 2026 at version 0.2.0. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 4 versions; the latest was published on 29 Nov 2026.
  • Findings: No rules fired in version 0.2.0.
  • Downloads: 326 downloads.

Versions

4 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.2.0 LATEST 29 Nov 2026 No rules fired
0.1.3 22 Nov 2026 No rules fired
0.1.1 21 Nov 2026 No rules fired
0.1.0 20 Nov 2026 Not shown

No rules fired in 0.2.0

Findings

Findings for v0.2.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 0.2.0; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

Fetch an AlphaFold predicted protein structure by UniProt accession from Python, as mmCIF or PDB text. Each structure is read from AlphaFold DB v6 with one HTTP range request against EBI's public bulk tars, using a prebuilt byte-offset index. For accessions outside the bulk set, it falls back to EBI's per-file endpoint. No mirror, no account, no key, and no multi-gigabyte tar download to get one protein.

import scigantic_alphafold as af

cif = af.fetch("P69905")                                 # hemoglobin alpha, mmCIF text
pdb = af.fetch("P69905", fmt="pdb")                      # the same model as PDB text
path = af.download("P69905", "structures")               # writes the .cif, returns a pathlib.Path
many = af.fetch_many(["P0A7G6", "P0A6F5", "P00350"])     # dict of id to text, 4 connections by default

af.fetch("A0A009IHW8")                                   # not in the bulk set: read from EBI's per-file endpoint instead
af.pae("A0A009IHW8")                                     # predicted aligned error, parsed JSON (per-file endpoint only)
af.confidence("A0A009IHW8")                              # per-residue pLDDT, parsed JSON

af.has("P69905")                                         # True: the accession is in the bulk set
af.locate("P69905")                                      # [Member(entry_id, fmt, tar, url, offset, length), ...]
ids = af.entries(proteome="UP000000625")                 # iterator over the entry ids of the E. coli tar

af.metadata("P69905")                                    # EBI prediction API records, no index needed
af.proteomes()                                           # EBI's list of bulk tars, with url and tax_id

A longer walkthrough, including per-residue pLDDT from the B-factor column, is in examples/quickstart.ipynb.

The fast path covers the v6 bulk set: Swiss-Prot plus 46 proteomes. Most of AlphaFold DB is outside that set; for those accessions fetch, fetch_bytes, download and fetch_many use EBI's per-file endpoint instead, which is slower (about one request per second, two requests per structure) and can be switched off. See Which path is used and What is covered.

Try it on hosted data

The Scigantic catalog entry for the AlphaFold Protein Structure Database opens a Jupyter notebook in the browser with EBI's bulk release mounted read-only: the same per-proteome and Swiss-Prot tars this library indexes, read in place with no download. More open structure data is listed under protein structure datasets.

Installation

$ pip install scigantic-alphafold

Python 3.10 or newer. There are no runtime dependencies; the package uses only the standard library.

Why this exists

EBI publishes AlphaFold DB v6 in bulk as 48 tar files at https://ftp.ebi.ac.uk/pub/databases/alphafold/v6/, 153.2 GB in total. The smallest is 173 MB (Helicobacter pylori), the human proteome is 5.2 GB and the Swiss-Prot mmCIF tar is 40.1 GB. A tar has no table of contents, so finding one protein in it normally means downloading the whole file.

Inside each tar every structure is its own small gzip file, and EBI's server honors HTTP Range requests. If you know the byte offset and length of a member, you can read that member alone. This package ships that knowledge as an index and does the range read.

On 2026-11-20 we observed that EBI's per-file URLs (https://alphafold.ebi.ac.uk/files/AF-<accession>-F1-model_v6.cif) returned HTTP 403 to scripted requests. On 2026-11-28 we looked again: the same URLs answered 403 to curl's default User-Agent and 200 to a descriptive one such as this library's, and the TrEMBL accessions we tried (outside the bulk set) were served. So the 403 we saw was a block on a User-Agent, not on the endpoint. We know of no announcement and no stated policy about it, and it can change. Release 0.1 therefore avoided the endpoint; the next release uses it only as a fallback, with its honest User-Agent, at a low request rate, and never tries to get around a refusal (see Which path is used).

Which path is used

call accession in the bulk set accession not in the bulk set
fetch, fetch_bytes, download, fetch_many one range request to the bulk tar on ftp.ebi.ac.uk, URL and offset from the index per-file fallback: one request to the prediction API, then one to the file URL the API names, both on alphafold.ebi.ac.uk
pae, confidence per-file endpoint (the tars hold no PAE or confidence files) per-file endpoint

The fallback is on by default. It never guesses a file name: the prediction API says which URL holds the file (cifUrl, pdbUrl, paeDocUrl, plddtDocUrl), and the URL must be under https://alphafold.ebi.ac.uk/files/. This matters, because not every entry is named AF-<accession>-F1-model_v6: on 2026-11-28 Q6GZX4 was served as AF-0000000365776990-model_v1.cif, and the guessed name returned 404. A fallback result can therefore be another model version than v6, and download names the file as EBI does.

How the fallback behaves:

  • Pace. Every per-file request, from every thread, starts at least 1 second after the previous one. fetch_many still reads bulk ids in parallel, but its fallback ids go through that one pace, whatever workers is.
  • Retries. Timeouts, dropped connections and 5xx answers are retried with backoff, four attempts in all, as for the bulk reader. 429 and 503 honor Retry-After (up to 120 s, and the other threads wait too; a longer request fails the call at once). Other 4xx answers are not retried. A 403 raises FetchError (with status=403) that names the User-Agent that was sent. The library will not change it to get past a refusal.
  • Not found. If the prediction API answers 404 or lists no record, or the file it names answers 404, NotFoundError is raised. It is a subclass of NotInBulkSetError, so existing except NotInBulkSetError handlers still catch it; catch NotFoundError first to tell "AlphaFold DB has no such prediction" from "not in the bulk set".
  • Bytes. The per-file endpoint serves plain files, so fetch_bytes and download(decompress=False) gzip them to keep the return type the same. fetch and download return the file as EBI sent it.
  • Switch. fallback=False on any call, or SCIGANTIC_ALPHAFOLD_PER_FILE_FALLBACK=0 (also false, no, off) in the environment, turns it off: an accession outside the bulk set then raises NotInBulkSetError with no request, as in 0.1. fallback=True overrides the variable. scigantic-alphafold get --no-fallback does the same. pae and confidence obey the switch too and raise FetchError when it is off.

Behavior change from 0.1: fetch of an accession outside the bulk set used to fail offline and now makes network requests. Set the environment variable to 0 where that matters, for example on a machine that may only reach ftp.ebi.ac.uk.

What is covered

The index covers the 48 tars listed in EBI's download_metadata.json (counts and sizes checked on 2026-11-20):

set tars structures size
Swiss-Prot, mmCIF 1 550,122 40.1 GB
Swiss-Prot, PDB 1 550,122 28.6 GB
Model organism proteomes 16 328,602 49.9 GB
Global health proteomes 30 227,244 34.7 GB

The proteome tars hold both formats for every entry. The 16 model organisms include human (UP000005640), mouse, rat, zebrafish, fruit fly, C. elegans, yeast, E. coli and Arabidopsis. af.proteomes() returns the full list with species, taxonomy id, reference proteome, structure count, size and URL. A protein can be in both Swiss-Prot and a proteome tar, so the counts above overlap.

What is not covered:

  • Any accession outside those tars, as far as the index goes. AlphaFold DB holds predictions for far more UniProt entries than the bulk set. af.locate(accession) returns an empty list and af.has(accession) returns False for such an accession, both without raising and without a request. fetch, fetch_bytes, download and fetch_many read it from the per-file endpoint (Which path is used), or raise NotInBulkSetError (a LookupError) when the fallback is off.
  • PAE and confidence in the bulk tars. The tars hold coordinates only. pae() and confidence() read those two files from the per-file endpoint.
  • MSAs. There are no alignment files in the bulk tars, and this library does not fetch the ones EBI links per entry.
  • Other files EBI links from an entry page, such as binary CIF and AlphaMissense annotations. Per-residue pLDDT is also stored in the B-factor column of the coordinates.
  • Older versions. The index describes v6 only.

af.metadata() is the exception to the coverage limit. It calls EBI's prediction API, which answers for all of AlphaFold DB, so a record from metadata() does not mean the structure is in the bulk set.

According to EBI's download page, proteins longer than 2,700 residues are predicted as overlapping 1,400-residue fragments (F1, F2, ...), and those fragments are in the human proteome tar. An entry id such as AF-Q8WZ42-F2 names one fragment.

Public API

function returns
fetch(id, fmt=None, fallback=None) the decompressed text of one structure (str)
fetch_bytes(id, fmt=None, fallback=None) the gzip bytes exactly as stored in the tar (gzipped by the library for a per-file fallback)
download(id, out_dir, fmt=None, decompress=True, fallback=None) pathlib.Path of the file written
fetch_many(ids, fmt=None, workers=4, on_error="raise", fallback=None) dict[str, str] keyed by the ids as given, fetched on a thread pool
pae(id, fallback=None) the predicted aligned error file, parsed JSON (per-file endpoint)
confidence(id, fallback=None) the per-residue pLDDT file, parsed JSON (per-file endpoint)
locate(id, fmt=None) list[Member]; a Member has entry_id, fmt, tar, url, offset, length
has(id) bool, answered from the index without a request to EBI
entries(proteome=..., fmt="cif"), entries(tar=..., fmt="cif") iterator over the entry ids of one tar
tars() list[Tar], the tars the index covers
index_info() dict describing the index in use
refresh_index() pathlib.Path of the freshly downloaded index
metadata(qualifier, timeout=30.0) list[dict] from EBI's prediction API
proteomes(timeout=30.0) list[dict] from EBI's download_metadata.json

id is a UniProt accession (P69905) or an AlphaFold DB entry id (AF-P69905-F1). fmt is "cif" or "pdb"; left as None it means mmCIF. A member file name such as AF-P69905-F1-model_v6.pdb.gz is also accepted as an id and selects its own format; a file name for another version, or one whose extension conflicts with an explicit fmt, raises InvalidIdError.

How an id resolves:

  • A bare accession resolves to AF-<accession>-F1 when that is its only fragment.
  • An accession that is split into several fragments (F1, F2, ...) raises AmbiguousEntryError listing the entry ids, because F1 alone is only the first part of the protein. Pass the entry id of the fragment you want. locate() returns all of them.
  • An isoform is its own accession (P12345-2).
  • When the same entry is in two tars (a Swiss-Prot protein that is also in a proteome tar), the tar whose name sorts first is read, which in practice is the proteome tar. locate() lists that copy first.

fetch_many attempts every id. If any fail it raises FetchManyError after the rest have finished, with the successes in .results and the failures in .errors. Pass on_error="skip" to get only the successes back.

Errors:

  • NotInBulkSetError (a LookupError): the accession is in no v6 bulk tar and the fallback is off.
  • NotFoundError (a NotInBulkSetError): the fallback ran and EBI has no such prediction or file (404).
  • AmbiguousEntryError: a bare accession has several fragments, or only isoform entries.
  • StaleIndexError (a RuntimeError): EBI replaced a tar after the index was built. Call refresh_index().
  • FetchError: EBI answered a range request, or a per-file request, with an HTTP error (a 403 included) or the retries ran out. It carries status.
  • FetchManyError: one or more ids in fetch_many failed. It carries results and errors.
  • IndexUnavailableError, IndexSchemaError: the index could not be downloaded, or was built for a newer version of this library.
  • InvalidIdError (a ValueError): the id is not an accession or entry id.
  • ApiError (a RuntimeError): metadata() or proteomes() got an HTTP error, a timeout or an unexpected body. It carries status and url.
metadata() and proteomes()

Both are thin passthroughs. They need no index, and they return what EBI sends.

metadata("P69905") calls https://alphafold.ebi.ac.uk/api/prediction/P69905 and returns a list of records with keys such as entryId, uniprotAccession, gene, taxId, organismScientificName, sequence, globalMetricValue (mean pLDDT) and latestVersion. The API answers a well-formed accession that has no prediction with HTTP 404 and an empty JSON object; metadata() returns [] for that case. A value that is not made of letters, digits, - and _ raises InvalidIdError (a ValueError) before any request is sent. An identifier the server rejects (HTTP 400) raises ApiError with the server's message.

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • pypi-releases scigantic-alphafold

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Vulnerability Insights

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?

Ethersphere Hijacked With Crypto Stealing Malware (1)
npm

Ethersphere Hijacked With Crypto Stealing Malware Via Github & npm

Copy of Template Design OX Blog (2)
Research

NGINX2Root: Five Critical NGINX Flaws Expose Web Servers to Remote Code Execution

Frame 2085668439 (1)
Group 1261154229