Python API for Spark Streaming

Modified the code based on your comment