swingmusic/app/utils/__init__.py
mungai-njoroge 336360d509 add routes to get all albums and artists with sort
+ rewrite load all albums + artist logic with itertools.groupby
+ add a function to convert seconds to string
2023-12-08 09:20:51 +03:00

12 lines
268 B
Python

import locale
# Set to user's default locale:
locale.setlocale(locale.LC_ALL, "")
# Or set to a specific locale:
# locale.setlocale(locale.LC_ALL, 'en_US.UTF-8')
def format_number(number: float) -> str:
return locale.format_string("%d", number, grouping=True)