You cannot directly connect to backend . When you make backend in python, you need to write APIs (see How to build rest api in Python ). Then from flutter you can connect to those APIs using http package.
Read moreIs firebase a good backend for Flutter?
Firebase is a Backend-as-a-Service (BaaS) app development platform that provides hosted backend services such as a realtime database, cloud storage, authentication, crash reporting, machine learning, remote configuration, and hosting for your static files. Firebase supports Flutter .
Read more