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.1.tar.gz
(13.4 kB
view details)
Built Distribution
File details
Details for the file hubstorage-0.18.1.tar.gz
.
File metadata
- Download URL: hubstorage-0.18.1.tar.gz
- Upload date:
- Size: 13.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5b1350ff57f52b26dd1fc5bf0bd2bcab372d295ff6de622befbd92466b1e2f6 |
|
MD5 | ac54acd6b55e760763bcd5e51c813073 |
|
BLAKE2b-256 | 99a5d68a16c0894f7e4e61a5bc6eccf29c07d1a13bb7c303ff89f58cab16ad84 |
File details
Details for the file hubstorage-0.18.1-py2-none-any.whl
.
File metadata
- Download URL: hubstorage-0.18.1-py2-none-any.whl
- Upload date:
- Size: 17.3 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3c42faff9587b7d0e965ae358cf6a88074349470e3c162febe07c05b3639b12d |
|
MD5 | cabc00ed4f43c97f797733d0278766ec |
|
BLAKE2b-256 | 2f6406adaac9203c27cc9b58c25ed06ec04c6776f84acd50ec71a9d79fcf227a |