Realtime data from NSE/BSE

Is there any options available for getting realtime data inside a python script to do realtime analytics?
Does zerodha have any APIs for placing Orders from a code after these analysis

You can use Kite Connect APIs for this. Check out the websocket streaming solution for this.

Yes, you can. Check this -

Thanks for the clarification. But how could I get api_ket and api_secret for using it? in Web socket I can see 3 parameters as below:
“your_api_key”, “your_public_token”, “logged_in_user_id”

You will get Api key and Api secret in while creating new app