-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtools.py
33 lines (29 loc) · 954 Bytes
/
tools.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
from rich import print as rprint
import random
def search_flights(departure_city, destination_city, travel_date):
rprint("[green]Running search_flights[/green]")
return [
{
"flight_number": "AA1422",
"departure_time": "8:00 AM",
travel_date: travel_date,
departure_city: departure_city,
destination_city: destination_city,
},
{
"flight_number": "DL1089",
"departure_time": "10:00 AM",
travel_date: travel_date,
departure_city: departure_city,
destination_city: destination_city,
},
]
def book_flight(flight_number, travel_date):
rprint("[green]Running book_flight[/green]")
seat_number = f"{random.randint(1, 30)}A"
return {
"status": "confirmed",
"flight_number": flight_number,
"travel_date": travel_date,
"seat_number": seat_number,
}