Exemple #1
0
def inchi2inchiKey(inchi):
    """
Converts InChis to InChiKeys. This method accepts urlsafe_base64 encoded string containing one or multiple InChis.
    """

    inchis = base64.urlsafe_b64decode(inchi)
    return _inchi2inchiKey(inchis)
Exemple #2
0
def inchi2inchiKey():
    """
Converts InChis to InChiKeys. This method accepts one or multiple InChis.
    """

    inchis = request.body.read()
    return _inchi2inchiKey(inchis)
Exemple #3
0
def inchi2inchiKey():
    """
Converts InChis to InChiKeys. This method accepts one or multiple InChis.
    """

    inchis = request.body.read()
    return _inchi2inchiKey(inchis)
Exemple #4
0
def inchi2inchiKey(inchi):
    """
Converts InChis to InChiKeys. This method accepts urlsafe_base64 encoded string containing one or multiple InChis.
    """

    inchis = base64.urlsafe_b64decode(inchi)
    return _inchi2inchiKey(inchis)
Exemple #5
0
def inchi2inchiKey(inchi):
    """
Converts InChis to InChiKeys. This method accepts urlsafe_base64 encoded string containing one or multiple InChis.
cURL examples:

    curl -X GET ${BEAKER_ROOT_URL}inchi2inchiKey/$(cat aspirin.inchi | base64 -w 0 | tr "+/" "-_")
    """

    inchis = base64.urlsafe_b64decode(inchi)
    return _inchi2inchiKey(inchis)
Exemple #6
0
def inchi2inchiKey(inchi):
    """
Converts InChis to InChiKeys. This method accepts urlsafe_base64 encoded string containing one or multiple InChis.
cURL examples:

    curl -X GET ${BEAKER_ROOT_URL}inchi2inchiKey/$(cat aspirin.inchi | base64 -w 0 | tr "+/" "-_")
    """

    inchis = base64.urlsafe_b64decode(inchi)
    return _inchi2inchiKey(inchis)
Exemple #7
0
def inchi2inchiKey():
    """
Converts InChis to InChiKeys. This method accepts one or multiple InChis.
cURL examples:

    curl -X POST --data-binary @aspirin.inchi ${BEAKER_ROOT_URL}inchi2inchiKey
    curl -X POST -F "[email protected]" ${BEAKER_ROOT_URL}inchi2inchiKey
    """

    inchis = request.files.values()[0].file.read() if len(request.files) else request.body.read()
    return _inchi2inchiKey(inchis)
Exemple #8
0
def inchi2inchiKey():
    """
Converts InChis to InChiKeys. This method accepts one or multiple InChis.
cURL examples:

    curl -X POST --data-binary @aspirin.inchi ${BEAKER_ROOT_URL}inchi2inchiKey
    curl -X POST -F "[email protected]" ${BEAKER_ROOT_URL}inchi2inchiKey
    """

    inchis = request.files.values()[0].file.read() if len(request.files) else request.body.read()
    return _inchi2inchiKey(inchis)