No description
Find a file
2012-01-19 16:55:07 +05:30
bin add extract all/extract offline modes 2012-01-04 13:45:10 +05:30
pandora_client specify oshash to upload 2012-01-19 16:55:07 +05:30
config.example.json better extract and file locating 2012-01-04 12:31:43 +05:30
README make api more pythonic, add __doc__ to functions 2010-12-04 15:14:54 +01:00
setup.py show progress during upload 2011-12-30 18:47:28 +05:30

pandora_client

python libary to access a pan.do/ra instance

pandora client example:
  import pandora_client
  #example config.json
  '''
  {
      "url": "http://localhost:8000/api/",
      "username": "username",
      "password": "password",
      "cache": "~/.ox/client.sqlite",
      "media-cache": "~/.ox/media",
      "volumes": {
          "volumename": "/media/2010/Movies"
      }
  }
  '''
  c = pandora_client.Client('config.json')
  c.scan()  #scans all volumes for files and updates cache db
  c.sync()  #syncs cached file info with site, and encodes and uploads requested media
  c.clean() #cleanup transcodes created druing sync to save disk space


just using the API:
    api = pandora_client.API("http://localhost:8000/api/")
    r = api.find(
        query={'conditions':[]},
        keys=['title', 'year'],
        range=[0, 100]
    )
    for i in r['data']['items']:
        ...

forther api documentation is available as python docstrings.
 api.find?
and there is a web api documentation at i.e. http://localhost:8000/api/