Skip to content

Commit

Permalink
README
Browse files Browse the repository at this point in the history
  • Loading branch information
heynemann committed Nov 16, 2013
1 parent 28760c8 commit 6e4367a
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,25 @@ Octopus.start()

If `auto_start` is set to `False`, this method must be called to start retrieving URLs. This is a **non-blocking** method.

Octopus.enqueue(url, handler)
-----------------------------

This is the main method in the `Octopus` class. This method is used to enqueue new URLs. The handler argument specifies the method to be called when the response is available.

The handler takes the form `handler(url, response)`. The response argument is a [Response](http://www.python-requests.org/en/latest/api/#requests.Response) instance.

This is a **non-blocking** method.

Octopus.queue_size
------------------

This property returns the approximate number of URLs still in the queue (not retrieved yet).

Octopus.is_empty
----------------

This property returns if the URL queue is empty.

Benchmark
=========

Expand Down

0 comments on commit 6e4367a

Please sign in to comment.