Here are the examples of the python api connexion.request.args taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
1 Examples
0
Source : routes.py
with MIT License
from Sage-Bionetworks
with MIT License
from Sage-Bionetworks
def get_manifest_route(schema_url, title, oauth, use_annotations):
# call config_handler()
config_handler()
# get path to temporary JSON-LD file
jsonld = get_temp_jsonld(schema_url)
# Gather all data_types to make manifests for.
all_args = connexion.request.args
args_dict = dict(all_args.lists())
data_type = args_dict['data_type']
def create_single_manifest(data_type):
# create object of type ManifestGenerator
manifest_generator = ManifestGenerator(
path_to_json_ld=jsonld,
title=t,
root=data_type,
oauth=oauth,
use_annotations=use_annotations,
)
dataset_id = connexion.request.args["dataset_id"]
if dataset_id == 'None':
dataset_id = None
result = manifest_generator.get_manifest(
dataset_id=dataset_id, sheet_url=True,
)
return result
# Gather all returned result urls
all_results = []
if data_type[0] == 'all manifests':
sg = SchemaGenerator(path_to_json_ld=jsonld)
component_digraph = sg.se.get_digraph_by_edge_type('requiresComponent')
components = component_digraph.nodes()
for component in components:
t = f'{title}.{component}.manifest'
result = create_single_manifest(data_type = component)
all_results.append(result)
else:
for dt in data_type:
if len(data_type) > 1:
t = f'{title}.{dt}.manifest'
else:
t = title
result = create_single_manifest(data_type = dt)
all_results.append(result)
return all_results
def validate_manifest_route(schema_url, data_type):