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.17.0.tar.gz
(13.5 kB
view details)
Built Distribution
File details
Details for the file hubstorage-0.17.0.tar.gz
.
File metadata
- Download URL: hubstorage-0.17.0.tar.gz
- Upload date:
- Size: 13.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ef25672f594cb265f2b941964f8af743e03a23daa1ab95c6f9a60ccd42e7287b |
|
MD5 | a811a42828906a16c6ab3b8fd3560619 |
|
BLAKE2b-256 | 77cedfb6f19f220cbe24529bfaa32ae61fc60aca796cd5146f7975dde9aff56c |
Provenance
File details
Details for the file hubstorage-0.17.0-py2-none-any.whl
.
File metadata
- Download URL: hubstorage-0.17.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 | d2324218c225546c559ba37a7c5744cba0c13c107f534ff15938c438816c308c |
|
MD5 | 104a1bb112a8afce5b42494c20d991c2 |
|
BLAKE2b-256 | 8dbb1a7d4862ea6b9804fd258bd52baa7c641ddbd08f92d53d54a330e8e36f18 |