api to create a meta-analysis specification
This Python package is automatically generated by the OpenAPI Generator project:
- API version: 1.0
- Package version: 0.0.1
- Generator version: 7.17.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit https://github.com/jdkent
Python 3.9+
If the python package is hosted on a repository, you can install directly using:
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git(you may need to run pip with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git)
Then import the package:
import neurosynth_compose_sdkInstall via Setuptools.
python setup.py install --user(or sudo python setup.py install to install the package for all users)
Then import the package:
import neurosynth_compose_sdkExecute pytest to run the tests.
Please follow the installation procedure and then run the following:
import neurosynth_compose_sdk
from neurosynth_compose_sdk.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://compose.neurosynth.org/api
# See configuration.py for a list of all supported configuration parameters.
configuration = neurosynth_compose_sdk.Configuration(
host = "https://compose.neurosynth.org/api"
)
# Enter a context with an instance of the API client
with neurosynth_compose_sdk.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = neurosynth_compose_sdk.AnnotationsApi(api_client)
nested = True # bool | show nested component instead of id (optional)
ids = ['ids_example'] # List[str] | choose the specific ids you wish to get (optional)
page = 56 # int | page of results (optional)
page_size = 56 # int | number of elements to return on a page (optional)
search = 'imagin' # str | search for entries that contain the substring (optional)
sort = 'created_at' # str | Parameter to sort results on (optional) (default to 'created_at')
desc = True # bool | sort results by descending order (as opposed to ascending order) (optional)
user_id = 'user_id_example' # str | user id you want to filter on (optional)
info = True # bool | display additional information about a nested relationship without displaying fully nested object (optional)
try:
# GET a list of annotations
api_response = api_instance.annotations_get(nested=nested, ids=ids, page=page, page_size=page_size, search=search, sort=sort, desc=desc, user_id=user_id, info=info)
print("The response of AnnotationsApi->annotations_get:\n")
pprint(api_response)
except ApiException as e:
print("Exception when calling AnnotationsApi->annotations_get: %s\n" % e)All URIs are relative to https://compose.neurosynth.org/api
| Class | Method | HTTP request | Description |
|---|---|---|---|
| AnnotationsApi | annotations_get | GET /annotations | GET a list of annotations |
| AnnotationsApi | annotations_id_get | GET /annotations/{id} | GET information about an annotation |
| AnnotationsApi | annotations_id_put | PUT /annotations/{id} | Update an Annotation |
| AnnotationsApi | annotations_post | POST /annotations | Create a new Annotation |
| DefaultApi | meta_analyses_id_delete | DELETE /meta-analyses/{id} | |
| DefaultApi | neurostore_studies_get | GET /neurostore-studies | Your GET endpoint |
| DefaultApi | neurostore_studies_id_get | GET /neurostore-studies/{id} | Your GET endpoint |
| DefaultApi | neurostore_studies_id_put | PUT /neurostore-studies/{id} | |
| DefaultApi | neurostore_studies_post | POST /neurostore-studies | |
| DefaultApi | studyset_references_get | GET /studyset-references | Your GET endpoint |
| DefaultApi | studyset_references_id_get | GET /studyset-references/{id} | Your GET endpoint |
| MetaAnalysesApi | meta_analyses_get | GET /meta-analyses | GET a list of meta-analyses |
| MetaAnalysesApi | meta_analyses_id_get | GET /meta-analyses/{id} | GET meta-analysis information |
| MetaAnalysesApi | meta_analyses_id_put | PUT /meta-analyses/{id} | Update a meta-analysis |
| MetaAnalysesApi | meta_analyses_post | POST /meta-analyses | Create a new meta-analysis |
| MetaAnalysesApi | meta_analysis_results_get | GET /meta-analysis-results | Your GET endpoint |
| MetaAnalysesApi | meta_analysis_results_id_get | GET /meta-analysis-results/{id} | Your GET endpoint |
| MetaAnalysesApi | meta_analysis_results_id_put | PUT /meta-analysis-results/{id} | |
| MetaAnalysesApi | meta_analysis_results_post | POST /meta-analysis-results | |
| MetaAnalysesApi | neurosynth_compose_resources_meta_analysis_jobs_meta_analysis_job_resource_get | GET /meta-analysis-jobs/{job_id} | Get status and logs for a meta-analysis job |
| MetaAnalysesApi | neurosynth_compose_resources_meta_analysis_jobs_meta_analysis_jobs_resource_get | GET /meta-analysis-jobs | List meta-analysis jobs for the current user |
| MetaAnalysesApi | neurosynth_compose_resources_meta_analysis_jobs_meta_analysis_jobs_resource_post | POST /meta-analysis-jobs | Submit a meta-analysis job |
| NeurovaultApi | neurovault_collections_get | GET /neurovault-collections | Get neurovault collections |
| NeurovaultApi | neurovault_collections_id_get | GET /neurovault-collections/{id} | Your GET endpoint |
| NeurovaultApi | neurovault_collections_id_put | PUT /neurovault-collections/{id} | |
| NeurovaultApi | neurovault_collections_post | POST /neurovault-collections | Create neurovault collection |
| NeurovaultApi | neurovault_files_get | GET /neurovault-files | Your GET endpoint |
| NeurovaultApi | neurovault_files_id_get | GET /neurovault-files/{id} | Your GET endpoint |
| NeurovaultApi | neurovault_files_id_put | PUT /neurovault-files/{id} | |
| NeurovaultApi | neurovault_files_post | POST /neurovault-files | |
| ProjectsApi | projects_get | GET /projects | Your GET endpoint |
| ProjectsApi | projects_id_delete | DELETE /projects/{id} | |
| ProjectsApi | projects_id_get | GET /projects/{id} | Your GET endpoint |
| ProjectsApi | projects_id_put | PUT /projects/{id} | |
| ProjectsApi | projects_post | POST /projects | |
| SpecificationsApi | specifications_get | GET /specifications | Get a list of Specifications |
| SpecificationsApi | specifications_id_get | GET /specifications/{id} | Get information about a Specification |
| SpecificationsApi | specifications_id_put | PUT /specifications/{id} | Update Meta-Analysis specification |
| SpecificationsApi | specifications_post | POST /specifications | Create a Specification |
| StudysetsApi | studysets_get | GET /studysets | Get a list of Studysets |
| StudysetsApi | studysets_id_get | GET /studysets/{id} | Get information about a Studyset |
| StudysetsApi | studysets_id_put | PUT /studysets/{id} | Update a Studyset |
| StudysetsApi | studysets_post | POST /studysets | Create a new Studyset |
| TagsApi | tags_get | GET /tags | Get a list of Tags |
| TagsApi | tags_id_get | GET /tags/{id} | Get information about a Tag |
| TagsApi | tags_post | POST /tags | Create a new Tag |
| UsersApi | users_get | GET /users | GET list of Users |
| UsersApi | users_id_get | GET /users/{id} | Get User Info by User ID |
| UsersApi | users_id_put | PUT /users/{id} | Update User Information |
| UsersApi | users_post | POST /users | Create A New User |
- Annotation
- AnnotationList
- AnnotationPostBody
- AnnotationReturn
- AnnotationUpdate
- Corrector
- Estimator
- MetaAnalysesGet400Response
- MetaAnalysis
- MetaAnalysisAnnotation
- MetaAnalysisJobList
- MetaAnalysisJobListMetadata
- MetaAnalysisJobLog
- MetaAnalysisJobRequest
- MetaAnalysisJobResponse
- MetaAnalysisList
- MetaAnalysisPostBody
- MetaAnalysisResults
- MetaAnalysisReturn
- MetaAnalysisSpecification
- MetaAnalysisStudyset
- MetaAnalysisTags
- NeurostoreAnalysis
- NeurostoreStudy
- NeurostoreStudyList
- NeurostoreStudyReturn
- NeurovaultCollection
- NeurovaultCollectionFilesInner
- NeurovaultCollectionReturn
- NeurovaultFile
- NeurovaultFileList
- NeurovaultFileReturn
- NeurovaultList
- Project
- ProjectList
- ProjectMetaAnalyses
- ProjectReturn
- ReadOnly
- Result
- ResultInit
- ResultList
- ResultListResults
- ResultReturn
- ResultUploadStatisticalMaps
- Specification
- SpecificationConditions
- SpecificationList
- SpecificationPostBody
- SpecificationReturn
- Studyset
- StudysetList
- StudysetPostBody
- StudysetReference
- StudysetReferenceList
- StudysetReferenceReturn
- StudysetReferenceSnapshotsInner
- StudysetReturn
- Tag
- TagList
- TagReturn
- User
- UserList
- UserReturn
Authentication schemes defined for the API:
- Type: Bearer authentication
- Type: API key
- API key parameter name: Compose-Upload-Key
- Location: HTTP header
The generator adds two helper modules to reduce import friction:
sdk.py: a single facade for endpoint groups.auth.py: Auth0 refresh-token exchange + automatic bearer token refresh.
from neurosynth_compose_sdk.sdk import SDK
sdk = SDK(host="https://example.org/api", access_token="<access-token>")
studysets_api = sdk.studysets
result = studysets_api.studysets_get()from neurosynth_compose_sdk.sdk import SDK
sdk = SDK.from_auth0_refresh_token(
domain="your-tenant.us.auth0.com",
client_id="<auth0-client-id>",
refresh_token="<auth0-refresh-token>",
audience="<optional-audience>",
)
# Access token is exchanged and refreshed automatically per request.
users = sdk.users.users_get()You can also use environment variables:
AUTH0_DOMAIN, AUTH0_CLIENT_ID, AUTH0_REFRESH_TOKEN, plus optional
AUTH0_AUDIENCE, AUTH0_CLIENT_SECRET, AUTH0_SCOPE.
sdk = SDK.from_auth0_env(prefix="AUTH0")