github.com/pyroscope-io/pyroscope@v0.37.3-0.20230725203016-5f6947968bd0/examples/python/rideshare/django/app/ride_share/views/bike/bike.py (about) 1 from rest_framework.views import APIView 2 from rest_framework.response import Response 3 4 from ride_share.utility.utility import find_nearest_vehicle 5 6 class BikeView(APIView): 7 """ 8 View to order a bike 9 """ 10 11 def order_bike(self, search_radius): 12 find_nearest_vehicle(search_radius, "bike") 13 14 def get(self, request, format=None): 15 """ 16 Order a bike within a certain radius. 17 """ 18 self.order_bike(0.2) 19 return Response(["Bike view"])