def stream_events(self, inputs, ew):
        # Go through each input for this modular input
        for input_name, input_item in inputs.inputs.iteritems():
            # Get fields from the InputDefinition object
            owner = input_item["owner"]
            repo_name = input_item["repo_name"]

            # Get the fork count from the Github API
            repo_url = "https://api.github.com/repos/%s/%s" % (owner, repo_name)
            response = urllib2.urlopen(repo_url).read()
            jsondata = json.loads(response)
            fork_count = jsondata["forks_count"]

            # Create an Event object, and set its fields
            event = Event()
            event.stanza = input_name
            event.data = 'owner="%s" repository="%s" fork_count=%s' % \
                         (owner.replace('"', '\\"'), repo_name.replace('"', '\\"'), fork_count)

            # Tell the EventWriter to write this event
            ew.write_event(event)
Put an item into the queue without blocking.
dataset/ETHPy150Open splunk/splunk-sdk-python/examples/github_forks/github_forks.py/MyScript.stream_events--crossover with--dataset/ETHPy150Open ralfonso/theory/theory/model/mpdqueue.py/Queue.put_nowait