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.18.0.tar.gz
(13.1 kB
view details)
Built Distribution
File details
Details for the file hubstorage-0.18.0.tar.gz
.
File metadata
- Download URL: hubstorage-0.18.0.tar.gz
- Upload date:
- Size: 13.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dcdf322b5956470381177b5e4994ec40e8ed08bb3030ab8466cd6a1305a69ea8 |
|
MD5 | 8d20530294d9524ea85ac59e8600ebf5 |
|
BLAKE2b-256 | 983c32dc83d7d606297e2e62a8e680313dc034da9b2d2cdd4a680fb194dfa49f |
Provenance
File details
Details for the file hubstorage-0.18.0-py2-none-any.whl
.
File metadata
- Download URL: hubstorage-0.18.0-py2-none-any.whl
- Upload date:
- Size: 17.0 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b846c605f6175ff3added359e7ffc68590c2a528c3a0f94d47253e6cafbaeed |
|
MD5 | fce72b6daa2a26a8fa82eda679618bb0 |
|
BLAKE2b-256 | 5fa9f9c290d4259057944e29d6b712700482087cb8cd5b2fdbb7d538c8bf8e10 |