FastAPI is a great choice in order to deploy RESTApi with python. Its fast, easy and powerful, and something to check if you work deploying AI models for real-time inferencing in kubernetes.
If you want to run a spark job in windows that make use of the spark SQL pool, you need to set the HADOOP_HOME and hadoop.home.dir environment variables manually and there is a very quick and easy solution to do this.