-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #799 from NeurodataWithoutBorders/break_up_endpoints
[Refactor Flask II] Break up top-level
- Loading branch information
Showing
15 changed files
with
274 additions
and
154 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from .dandi import dandi_namespace | ||
from .data import data_namespace | ||
from .neuroconv import neuroconv_namespace | ||
from .neurosift import neurosift_namespace | ||
from .startup import startup_namespace | ||
from .system import system_namespace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
"""An API for handling requests to the DANDI Python API.""" | ||
|
||
from typing import List, Tuple, Union | ||
|
||
import flask_restx | ||
|
||
dandi_namespace = flask_restx.Namespace( | ||
name="dandi", description="Request various static listings from the DANDI Python API." | ||
) | ||
|
||
|
||
@dandi_namespace.route("/get-recommended-species") | ||
class SupportedSpecies(flask_restx.Resource): | ||
|
||
@dandi_namespace.doc( | ||
description=( | ||
"Request the list of currently supported species (by Latin Binomial name) for DANDI. Note that any " | ||
"explicit NCBI taxonomy link is also supported." | ||
), | ||
) | ||
def get(self) -> Union[List[Tuple[List[str], str, str, str]], None]: | ||
from dandi.metadata.util import species_map | ||
|
||
return species_map |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.