Registry / ai-ml / rcsb-api

rcsb-api

JSON →
library1.7.3pypypiunverified

Python package interface for RCSB.org API services. Provides access to PDB data, search, and graphQL queries. Current version: 1.7.3 (requires Python ≥3.9, <4.0). Released on PyPI roughly monthly.

pip install rcsb-api
INSTALL
IMPORT
SIG · RCSB-API
R
rcsb-api
ai-mlpythonv1.7.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

RCSBQueryAPI
from rcsbapi.search import RCSBQueryAPI
from rcsbapi.search import RCSBQueryAPI

Search for PDB assemblies containing 'hemoglobin' using TextQuery.

from rcsbapi.search import TextQuery, ReturnType query = TextQuery("hemoglobin") results = query.exec(return_type=ReturnType.ASSEMBLY, rows=5) for entry in results: print(entry)
Debug
Known issues
gotchaDefault return_type is 'entry' (polymer entities). For full assemblies, explicitly use ReturnType.ASSEMBLY.
fix
Use query.exec(return_type=ReturnType.ASSEMBLY) for assemblies.
affects: all
breakingPython 3.9 minimum. Dropped Python 3.8 support in version 1.4.0.
fix
Upgrade Python to 3.9+.
affects: >=1.4.0
deprecatedThe 'rcsbapi.search' module's 'SearchQuery' class is deprecated in favor of 'TextQuery'.
fix
Use 'from rcsbapi.search import TextQuery' instead.
affects: >=1.6.0
gotchaGraphQL queries require the 'query_id' from the RCSB PDB website, not arbitrary GraphQL.
fix
Construct GraphQL query manually using GraphQLQuery or use predefined search methods.
affects: all
Upgrade
Version history
1.7.3latest on PyPI · released May 5, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
6
OpenAI (training)
1
Resources
rcsb-api — pip install rcsb-api · libregistry