GithubHelp home page GithubHelp logo

python-hubstorage's Introduction

HubStorage service client library

https://badge.fury.io/py/hubstorage.png https://secure.travis-ci.org/scrapinghub/python-hubstorage.png?branch=master

Note

This module is experimental and its API may change without previous notice.

Overview

This is the HubStorage client library, which contains:

  • Full client api trough hubstorage.HubstorageClient

Requirements

Basic API

Example creating a new job:

>>> from hubstorage import HubstorageClient
>>> hs = HubstorageClient(auth=apikey)
>>> job = hs.new_job(projectid='1111111', spider='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'}]

...

python-hubstorage's People

Contributors

andresp99999 avatar dangra avatar kalessin avatar omab avatar pablohoffman avatar shaneaevans avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.