-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
33 lines (21 loc) · 1.22 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
from fastapi import FastAPI, Request
from fastapi.responses import RedirectResponse
from app.api.api import ApiRouter
description = """
#### JioSaavn API written in Python using [FastAPI](https://github.com/tiangolo/fastapi)
# [Github](https://github.com/vidyasagar1432/jiosaavn-api)
#### **Made using**:
#### [FastAPI](https://github.com/tiangolo/fastapi) is a modern, fast (high-performance), web framework for building APIs
#### [Uvicorn](https://github.com/encode/uvicorn) is a lightning-fast ASGI server implementation,
#### [Pydantic](https://github.com/samuelcolvin/pydantic/) is used for data validation and settings management using python type annotations.
#### [jiosaavn](https://github.com/vidyasagar1432/jiosaavn) is used to Search songs & album. Get song, album, playlist & lyric information from JioSaavn.
#### [detacache](https://github.com/vidyasagar1432/detacache) is used to cache request to Deta Base.
"""
app = FastAPI(title='jiosaavn-api', version=1.0,description=description)
app.include_router(ApiRouter,tags=['Api'])
@app.get("/robots.txt",include_in_schema=False)
async def robots_txt():
return ''
@app.get("/",include_in_schema=False)
async def root(request: Request):
return RedirectResponse('/docs')