in apache kafka scala being used for streaming but just wanted to know as scala is more or less related to java can we use python for this
Yes we can use Python.
Please check Spark documentation for Python examples. APIs are almost similar in Scala and Python.
Hope this helps.