fetchprotein
A Python package to fetch a protein 3D Structure / MSA / FASTA file from the PDB, UniProt or AlphaFold-DB (depending on the protein_filename extension).
Supports extensions:
pdb: for 3D structure from PDB or AlphaFold-DBcif: for 3D structure from PDB or AlphaFold-DBfasta: for FASTA from PDB or UniProta3m: for MSA from AlphaFold-DB (API is currently unavailable)
Installation and Usage
Install with pip:
pip install fetchprotein
CLI usage:
fetchprotein --help
fetchprotein 6m0j.pdb
fetchprotein Q9LW00.cif
fetchprotein Q9LW00.a3m # might be currently unavailable
fetchprotein Q9LW00.fasta
fetchprotein 6m0j.fasta
Python usage:
WARNING: Fetch for AlphaFold-DB MSA is currently unavailable.
# Imports
from fetchprotein.fetch import fetchprotein
from fetchprotein.fetch import fetch_structure, fetch_sequence, fetch_msa
# Use generic fetch function
path = fetchprotein('6M0J.pdb', output_dir='./test_data/') # fetch 3D structure from PDB
path = fetchprotein('Q9LW00.cif', output_dir='./test_data/') # fetch 3D structure from AlphaFold-DB
path = fetchprotein('Q9LW00.a3m', output_dir='./test_data/') # fetch MSA from AlphaFold-DB
path = fetchprotein('Q9LW00.fasta', output_dir='./test_data/') # fetch FASTA from UniProt
path = fetchprotein('6M0J.fasta', output_dir='./test_data/') # fetch FASTA from PDB
# Use specific fetch functions
path = fetch_structure('6M0J', extension="cif", output_dir='./test_data/')
path = fetch_structure('Q9LW00', extension="pdb", output_dir='./test_data/')
path = fetch_sequence('6M0J', extension="fasta", output_dir='./test_data/')
path = fetch_sequence('Q9LW00', extension="fasta", output_dir='./test_data/')
path = fetch_msa('Q9LW00', extension="a3m", output_dir='./test_data/')
Metadata
Release files for fetchprotein 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fetchprotein-1.0.1.tar.gz | 5.8 kB | Without provenance | Details for fetchprotein-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fetchprotein-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for fetchprotein-1.0.1-py3-none-any.whl |
Total release size: 12.6 kB
Release files / fetchprotein-1.0.1.tar.gz
| Download URL | fetchprotein-1.0.1.tar.gz |
|---|---|
| Size | 5.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8ad855f7890e770b4d73b77891e0252b332d43f53cb4b962172307e44551fcc0
|
|
BLAKE2b-256 checksum How to use checksums |
ad57d8aaf403d3791aa40c18a69d0cdbb413ceb28ef99c81a8ac395e602bb3d2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Release files / fetchprotein-1.0.1-py3-none-any.whl
| Download URL | fetchprotein-1.0.1-py3-none-any.whl |
|---|---|
| Size | 6.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5157aabe5774c4ae4eb7aea6d9fe1b2838b81c7c2480a5d6e592b153ec191e8e
|
|
BLAKE2b-256 checksum How to use checksums |
6642e2c2382ab1c0771942c35694d4f93e61185f5b4047a3cc62e2c9b8851d2b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Security for fetchprotein 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.