Python Use Api To Fetch Data From Database