-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.py
36 lines (25 loc) · 848 Bytes
/
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
31
32
33
34
35
36
import json
from typing import List
from models.book import Book
def main() -> None:
books = fetch_all_books()
output = json.dumps(books, indent=4)
print(output)
def fetch_all_books() -> List[Book]:
with open('samples/data.json', 'rb') as input:
books = json.load(input)
return books
# Feature-Request: Clients want to be able to display the names of the Authors we support.
def get_authors():
pass
# Feature-Request: Our support teams want to be able to add new books we support to our data store.
def add_book():
pass
# Feature-Request: Clients want to be able to search for books by a certain author.
def get_books_by_author_name():
pass
# Feature-Request: Clients want to be able to search for books within a genre.
def get_books_by_genre():
pass
if __name__ == '__main__':
main()