Unless you have a specific need for an async Python client, you are probably looking for the synchronous IGVF Python client.
The Python client is autogenerated based on this IGVF OpenAPI specification, which exposes search, collection, and other read endpoints from the IGVF Data Portal.
Note while the API endpoints are relatively stable, the underlying data model is still evolving, and changing fields/types can cause breaking changes. The latest version of the client reflects the latest version of the schema used by the API.
- API version: 101.2.0
- Package version: 101.2.0
- Generator version: 7.8.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
Python 3.9+
Pip install:
$ pip install igvf-async-clientOr clone the repo and and install:
$ git clone https://github.com/IGVF-DACC/igvf-async-python-client
$ cd igvf-async-python-client
$ pip install -e .Then import the package:
$ python -m asyncio
>>> import igvf_async_client(Must use an async runtime, e.g. $ python -m asyncio.)
from igvf_async_client import AsyncIgvfApi
api = AsyncIgvfApi()
# Search for Software that matches query `abc`.
r = await api.search(query='abc', type=['Software'])
# Print total number of results and list of results in `@graph`.
print(r.total)
print(r.graph)
# Pull first item, unwrap to underlying Software item with `actual_instance`.
software_item = r.graph[0].actual_instance
# Print Software item and specific fields.
print(software_item)
print(software_item.id)
print(software_item.description)
# Get the Lab item based on the lab @id in the Software item.
lab = await api.get_by_id(software_item.lab)
# Print lab and specific field.
print(lab)
print(lab.title)See other examples in async_example.ipynb and test_endpoint.py
Refer to the documentation for a full specification of endpoint inputs and outputs and model fields.
All URIs are relative to https://api.data.igvf.org
| Class | Method | HTTP request | Description |
|---|---|---|---|
| AsyncIgvfApi | search | GET /search | Search for items on the IGVF Data Portal. |
| AsyncIgvfApi | schemas | GET /profiles | Retrieve JSON schemas for all item types |
| AsyncIgvfApi | schema_for_item_type | GET /profiles/{item_type} | Retrieve JSON schema for item type |
| AsyncIgvfApi | report | GET /multireport.tsv | Generate a TSV file report based on search query. All results are returned. |
| AsyncIgvfApi | get_by_id | GET /{resource_id} | Get item information |
| AsyncIgvfApi | download | GET /{file_id}/@@download | Download file. |
| AsyncIgvfApi | batch_download | GET /batch-download | List files to download based on search query. All results are returned. |
All URIs are relative to https://api.data.igvf.org
| Class | Method | HTTP request | Description |
|---|---|---|---|
| AsyncIgvfApi | access_keys | GET /access-keys/@@listing | List items in the AccessKey collection. |
| AsyncIgvfApi | alignment_files | GET /alignment-files/@@listing | List items in the AlignmentFile collection. |
| AsyncIgvfApi | analysis_sets | GET /analysis-sets/@@listing | List items in the AnalysisSet collection. |
| AsyncIgvfApi | analysis_step_versions | GET /analysis-step-versions/@@listing | List items in the AnalysisStepVersion collection. |
| AsyncIgvfApi | analysis_steps | GET /analysis-steps/@@listing | List items in the AnalysisStep collection. |
| AsyncIgvfApi | assay_terms | GET /assay-terms/@@listing | List items in the AssayTerm collection. |
| AsyncIgvfApi | auxiliary_sets | GET /auxiliary-sets/@@listing | List items in the AuxiliarySet collection. |
| AsyncIgvfApi | awards | GET /awards/@@listing | List items in the Award collection. |
| AsyncIgvfApi | biomarkers | GET /biomarkers/@@listing | List items in the Biomarker collection. |
| AsyncIgvfApi | configuration_files | GET /configuration-files/@@listing | List items in the ConfigurationFile collection. |
| AsyncIgvfApi | construct_library_sets | GET /construct-library-sets/@@listing | List items in the ConstructLibrarySet collection. |
| AsyncIgvfApi | crispr_modifications | GET /crispr-modifications/@@listing | List items in the CrisprModification collection. |
| AsyncIgvfApi | curated_sets | GET /curated-sets/@@listing | List items in the CuratedSet collection. |
| AsyncIgvfApi | degron_modifications | GET /degron-modifications/@@listing | List items in the DegronModification collection. |
| AsyncIgvfApi | documents | GET /documents/@@listing | List items in the Document collection. |
| AsyncIgvfApi | genes | GET /genes/@@listing | List items in the Gene collection. |
| AsyncIgvfApi | human_donors | GET /human-donors/@@listing | List items in the HumanDonor collection. |
| AsyncIgvfApi | image_files | GET /image-files/@@listing | List items in the ImageFile collection. |
| AsyncIgvfApi | images | GET /images/@@listing | List items in the Image collection. |
| AsyncIgvfApi | in_vitro_systems | GET /in-vitro-systems/@@listing | List items in the InVitroSystem collection. |
| AsyncIgvfApi | index_files | GET /index-files/@@listing | List items in the IndexFile collection. |
| AsyncIgvfApi | institutional_certificates | GET /institutional-certificates/@@listing | List items in the InstitutionalCertificate collection. |
| AsyncIgvfApi | labs | GET /labs/@@listing | List items in the Lab collection. |
| AsyncIgvfApi | matrix_files | GET /matrix-files/@@listing | List items in the MatrixFile collection. |
| AsyncIgvfApi | measurement_sets | GET /measurement-sets/@@listing | List items in the MeasurementSet collection. |
| AsyncIgvfApi | model_files | GET /model-files/@@listing | List items in the ModelFile collection. |
| AsyncIgvfApi | model_sets | GET /model-sets/@@listing | List items in the ModelSet collection. |
| AsyncIgvfApi | mpra_quality_metrics | GET /mpra-quality-metrics/@@listing | List items in the MpraQualityMetric collection. |
| AsyncIgvfApi | multiplexed_samples | GET /multiplexed-samples/@@listing | List items in the MultiplexedSample collection. |
| AsyncIgvfApi | open_reading_frames | GET /open-reading-frames/@@listing | List items in the OpenReadingFrame collection. |
| AsyncIgvfApi | pages | GET /pages/@@listing | List items in the Page collection. |
| AsyncIgvfApi | perturb_seq_quality_metrics | GET /perturb-seq-quality-metrics/@@listing | List items in the PerturbSeqQualityMetric collection. |
| AsyncIgvfApi | phenotype_terms | GET /phenotype-terms/@@listing | List items in the PhenotypeTerm collection. |
| AsyncIgvfApi | phenotypic_features | GET /phenotypic-features/@@listing | List items in the PhenotypicFeature collection. |
| AsyncIgvfApi | platform_terms | GET /platform-terms/@@listing | List items in the PlatformTerm collection. |
| AsyncIgvfApi | prediction_sets | GET /prediction-sets/@@listing | List items in the PredictionSet collection. |
| AsyncIgvfApi | primary_cells | GET /primary-cells/@@listing | List items in the PrimaryCell collection. |
| AsyncIgvfApi | publications | GET /publications/@@listing | List items in the Publication collection. |
| AsyncIgvfApi | reference_files | GET /reference-files/@@listing | List items in the ReferenceFile collection. |
| AsyncIgvfApi | rodent_donors | GET /rodent-donors/@@listing | List items in the RodentDonor collection. |
| AsyncIgvfApi | sample_terms | GET /sample-terms/@@listing | List items in the SampleTerm collection. |
| AsyncIgvfApi | sequence_files | GET /sequence-files/@@listing | List items in the SequenceFile collection. |
| AsyncIgvfApi | signal_files | GET /signal-files/@@listing | List items in the SignalFile collection. |
| AsyncIgvfApi | single_cell_atac_seq_quality_metrics | GET /single-cell-atac-seq-quality-metrics/@@listing | List items in the SingleCellAtacSeqQualityMetric collection. |
| AsyncIgvfApi | single_cell_rna_seq_quality_metrics | GET /single-cell-rna-seq-quality-metrics/@@listing | List items in the SingleCellRnaSeqQualityMetric collection. |
| AsyncIgvfApi | software | GET /software/@@listing | List items in the Software collection. |
| AsyncIgvfApi | software_versions | GET /software-versions/@@listing | List items in the SoftwareVersion collection. |
| AsyncIgvfApi | sources | GET /sources/@@listing | List items in the Source collection. |
| AsyncIgvfApi | starr_seq_quality_metrics | GET /starr-seq-quality-metrics/@@listing | List items in the StarrSeqQualityMetric collection. |
| AsyncIgvfApi | tabular_files | GET /tabular-files/@@listing | List items in the TabularFile collection. |
| AsyncIgvfApi | technical_samples | GET /technical-samples/@@listing | List items in the TechnicalSample collection. |
| AsyncIgvfApi | tissues | GET /tissues/@@listing | List items in the Tissue collection. |
| AsyncIgvfApi | treatments | GET /treatments/@@listing | List items in the Treatment collection. |
| AsyncIgvfApi | users | GET /users/@@listing | List items in the User collection. |
| AsyncIgvfApi | whole_organisms | GET /whole-organisms/@@listing | List items in the WholeOrganism collection. |
| AsyncIgvfApi | workflows | GET /workflows/@@listing | List items in the Workflow collection. |
- ATACBamSummaryStats
- ATACFragmentSummaryStats
- ATACFragmentsAlignmentStats
- AccessKey
- AccessKeyResults
- AlignmentFile
- AlignmentFileResults
- AnalysisSet
- AnalysisSetResults
- AnalysisStep
- AnalysisStepResults
- AnalysisStepVersion
- AnalysisStepVersionResults
- AssayTerm
- AssayTermResults
- Attachment
- Attachment1
- AuxiliarySet
- AuxiliarySetResults
- Award
- AwardResults
- Biomarker
- BiomarkerResults
- ConfigurationFile
- ConfigurationFileResults
- ConstructLibrarySet
- ConstructLibrarySetResults
- CrisprModification
- CrisprModificationResults
- CuratedSet
- CuratedSetResults
- DegronModification
- DegronModificationResults
- Document
- DocumentResults
- Gene
- GeneLocation
- GeneLocation1
- GeneResults
- HumanDonor
- HumanDonorResults
- Image
- ImageFile
- ImageFileResults
- ImageResults
- InVitroSystem
- InVitroSystemResults
- IndexFile
- IndexFileResults
- InstitutionalCertificate
- InstitutionalCertificateResults
- Item
- ItemType
- Lab
- LabResults
- Limit
- Locus
- Locus1
- MatrixFile
- MatrixFileResults
- MeasurementSet
- MeasurementSetResults
- ModelFile
- ModelFileResults
- ModelSet
- ModelSetResults
- MpraQualityMetric
- MpraQualityMetricResults
- MultiplexedSample
- MultiplexedSampleResults
- NoResultsResponse
- NoResultsResponseColumnsValue
- NoResultsResponseFacetGroupsInner
- NoResultsResponseFacetsInner
- NoResultsResponseFiltersInner
- NoResultsResponseSortValue
- OpenReadingFrame
- OpenReadingFrameResults
- Page
- PageLayout
- PageLayoutComponents
- PageResults
- PerturbSeqQualityMetric
- PerturbSeqQualityMetricResults
- PhenotypeTerm
- PhenotypeTermResults
- PhenotypicFeature
- PhenotypicFeatureResults
- PlatformTerm
- PlatformTermResults
- PredictionSet
- PredictionSetResults
- PrimaryCell
- PrimaryCellResults
- Publication
- PublicationResults
- RNASeqKBInfo
- ReferenceFile
- ReferenceFileResults
- RelatedDonor
- RodentDonor
- RodentDonorResults
- SampleTerm
- SampleTermResults
- SearchFacet
- SearchResultItem
- SearchResults
- SequenceFile
- SequenceFileResults
- SignalFile
- SignalFileResults
- SingleCellAtacSeqQualityMetric
- SingleCellAtacSeqQualityMetricResults
- SingleCellRnaSeqQualityMetric
- SingleCellRnaSeqQualityMetricResults
- Software
- SoftwareResults
- SoftwareVersion
- SoftwareVersionResults
- Source
- SourceResults
- StarrSeqQualityMetric
- StarrSeqQualityMetricResults
- TabularFile
- TabularFileResults
- TechnicalSample
- TechnicalSampleResults
- Tile
- Tissue
- TissueResults
- Treatment
- TreatmentResults
- User
- UserResults
- WholeOrganism
- WholeOrganismResults
- Workflow
- WorkflowResults
Authentication schemes defined for the API:
- Type: HTTP basic authentication
import os
from igvf_async_client import Configuration
from igvf_async_client import ApiClient
from igvf_async_client import AsyncIgvfApi
config = Configuration(
access_key = os.environ["IGVF_ACCESS_KEY"],
secret_access_key = os.environ["IGVF_SECRET_ACCESS_KEY"]
)
client = ApiClient(config)
api = AsyncIgvfApi(client)