Boavizta / boaviztapi

🛠 Giving access to BOAVIZTA reference data and methodologies trough a RESTful API
GNU Affero General Public License v3.0
66 stars 23 forks source link

Add a util router to retrieve all CPU names #156

Closed da-ekchajzer closed 1 year ago

da-ekchajzer commented 1 year ago

Problem

As mention in #155 we should add a new /utils router for retrieving all available CPU names.

Solution

@utils_router.get('/cpu_name', description=cpu_name)
async def utils_get_all_cpu_name():
    df = _cpu_index[_cpu_index["name"].notna()]
    return [*df["name"].unique()]