Client interface for Scrapinghub HubStorage
Project description
Overview
This is the HubStorage client library, which contains:
Full client api trough hubstorage.HubstorageClient
Requirements
requests: http://pypi.python.org/pypi/requests
Basic API
Example creating a new job:
>>> from hubstorage import HubstorageClient >>> hs = HubstorageClient(auth=apikey) >>> job = hs.push_job(projectid='1111111', spidername='foo') >>> job.key '1111111/1/1' >>> job.metadata['state'] 'pending' >>> job.items.write({'title': 'my first item'}) >>> job.logs.info('lorem impsum message are cool') >>> job.logs.error('but sometimes s**t happens') >>> job.finished()
Example getting job data later:
>> job = hs.get_job('1111111/1/1') >> job.metadata['state'] 'finished' >> list(job.items.list(count=1)) [{'title': 'my first item'}] ...
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
hubstorage-0.16.1.tar.gz
(13.0 kB
view details)
Built Distribution
File details
Details for the file hubstorage-0.16.1.tar.gz
.
File metadata
- Download URL: hubstorage-0.16.1.tar.gz
- Upload date:
- Size: 13.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 53985184b020b1c286228526befa324555e95ddcbf69bd5bebcb598407c907e1 |
|
MD5 | e1899d06a48cee9482137b9ff09c2ffe |
|
BLAKE2b-256 | b13cd704667b2c0a2bb7e9083b211757d6a4646c15b2c39217b11003f705ea93 |
Provenance
File details
Details for the file hubstorage-0.16.1-py2-none-any.whl
.
File metadata
- Download URL: hubstorage-0.16.1-py2-none-any.whl
- Upload date:
- Size: 16.9 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 36e7c47c5daa203f64d0f3503049f1d77b9b1748e08577ae98a422af2a9fb462 |
|
MD5 | 5798d9eef421de7ed9e588738abfe79a |
|
BLAKE2b-256 | 638940b40884f7ddc487330471776e7ff10a412943d72fd7fec71b4c15b11a50 |