Skip to content

Commit

Permalink
Adding a version route
Browse files Browse the repository at this point in the history
  • Loading branch information
da-ekchajzer committed Sep 29, 2024
1 parent bf8a0ed commit a01aa54
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion boaviztapi/routers/utils_router.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os
import os

import pandas as pd
import toml
from fastapi import APIRouter, Query

from boaviztapi.dto.component.cpu import CPU
Expand All @@ -23,6 +23,12 @@
_ram_manuf = pd.read_csv(os.path.join(data_dir, 'crowdsourcing/ram_manufacture.csv'))



@utils_router.get('/version', description="Get the version of the API")
async def version():
return toml.loads(open(os.path.join(os.path.dirname(__file__), '../../pyproject.toml'), 'r').read())['tool']['poetry'][
'version']

@utils_router.get('/country_code', description=country_code)
async def utils_get_all_countries():
return get_available_countries()
Expand Down

0 comments on commit a01aa54

Please sign in to comment.