Skip to content

Commit

Permalink
fix: main text
Browse files Browse the repository at this point in the history
  • Loading branch information
Kohulan committed Feb 10, 2025
1 parent 43846df commit e0e5bdd
Showing 1 changed file with 32 additions and 14 deletions.
46 changes: 32 additions & 14 deletions app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from fastapi.responses import RedirectResponse
from fastapi_versioning import VersionedFastAPI
from prometheus_fastapi_instrumentator import Instrumentator
from typing import Dict

from .routers import chem
from .routers import converters
Expand All @@ -20,20 +21,37 @@
if os.getenv("INCLUDE_OCSR", "true").lower() == "true":
from .routers import ocsr

app = FastAPI(
title="Cheminformatics Microservice",
description="This set of essential and valuable microservices is designed to be accessed via API calls to support cheminformatics. Generally, it is designed to work with SMILES-based inputs and could be used to translate between different machine-readable representations, get Natural Product (NP) likeliness scores, visualize chemical structures, and generate descriptors. In addition, the microservices also host an instance of STOUT and another instance of DECIMER (two deep learning models for IUPAC name generation and optical chemical structure recognition, respectively).",
terms_of_service="https://docs.api.naturalproducts.net",
contact={
"name": "Steinbeck Lab",
"url": "https://cheminf.uni-jena.de/",
"email": "caffeine@listserv.uni-jena.de",
},
license_info={
"name": "CC BY 4.0",
"url": "https://creativecommons.org/licenses/by/4.0/",
},
)

def create_app_metadata() -> Dict:
return {
"title": "Cheminformatics API",
"description": """This set of essential and valuable microservices is designed to be accessed via API calls to support cheminformatics. Generally, it is designed to work with SMILES-based inputs and could be used to translate between different machine-readable representations, get Natural Product (NP) likeliness scores, visualize chemical structures, and generate descriptors. In addition, the microservices also host an instance of DECIMER (a deep learning model for optical chemical structure recognition).
""",
"version": "3.0.2",
"terms_of_service": "https://docs.api.naturalproducts.net",
"contact": {
"name": "Steinbeck Lab",
"url": "https://cheminf.uni-jena.de",
"email": "caffeine@listserv.uni-jena.de"
},
"license_info": {
"name": "CC BY 4.0",
"url": "https://creativecommons.org/licenses/by/4.0"
},
"openapi_tags": [{
"name": "Chemical Analysis",
"description": "Advanced molecular structure analysis and property prediction"
}, {
"name": "Visualization",
"description": "High-fidelity chemical structure rendering and visualization"
}, {
"name": "Conversion",
"description": "Sophisticated molecular format transformation tools"
}]
}


app = FastAPI(**create_app_metadata())

app.include_router(chem.router)
app.include_router(converters.router)
Expand Down

0 comments on commit e0e5bdd

Please sign in to comment.