This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description
scieloapi.py
============

Thin wrapper around the SciELO Manager RESTful API.

[![Build Status](https://travis-ci.org/scieloorg/scieloapi.py.png?branch=master)](https://travis-ci.org/scieloorg/scieloapi.py)

Usage example:

import scieloapi

client = scieloapi.Client('some.user', 'some.api_key')

for journal in client.journals.all():
print journal['id'], journal['title']


How to install
--------------

You can install it via `pip`, directly from the github repo:

pip install -e git+git://github.com/scieloorg/scieloapi.py.git#egg=scieloapi

Or from PyPi (more stable):

pip install scieloapi


Basics
------

When a `Client` instance is initialized, the process automaticaly instrospects the API server
in order to make available only the endpoints part of the specified API version. The API version
may be passed as keyword argument `version` when creating the `Client` instance. If ommited,
the highest version is used.


>>> client = scieloapi.Client('some.user', 'some.api_key', api_uri='http://manager.scielo.org/api/' version='v1')


Listing available endpoints:

>>> client.endpoints
[u'pressreleases', u'users', u'sections', u'sponsors', u'collections', u'changes', u'apressreleases', u'uselicenses', u'journals', u'issues']
>>>

Listing all items of an endpoint:

>>> for journal in client.journals.all(): print journal['title']
...
Acta Médica Costarricense
Acta Pediátrica Costarricense
Actualidades Investigativas en Educación
Adolescencia y Salud
Agronomía Costarricense
Agronomía Mesoamericana
Annali dell'Istituto Superiore di Sanità
Arquivos em Odontologia
Brazilian Journal of Oral Sciences
Bulletin of the World Health Organization
Cadernos de Saúde Pública
>>>


Listing items matching some params:

>>> for journal in client.journals.filter(collection='saude-publica'): print journal['title']
...
Annali dell'Istituto Superiore di Sanità
Bulletin of the World Health Organization
Cadernos de Saúde Pública
Ciência & Saúde Coletiva
Gaceta Sanitaria
MEDICC Review
Revista Brasileira de Epidemiologia
Revista Cubana de Salud Pública
Revista de Salud Pública
>>>


Getting a specific item:

>>> journal = client.journals.get(62)
>>> journal['title']
u'Acta M\xe9dica Costarricense'
>>>


Use license
-----------

This project is licensed under FreeBSD 2-clause. See `LICENSE` for more details.


History
=======

0.5 (2014-02-10)
----------------

* Added `tox.ini` to help the porting to Python3.3.
* Support for https (without verifiying CA).
* Added `Content-Type: application/json` HTTP header to all post requests.
* Added a do-nothing logger handler by default.


0.4 (2013-08-30)
----------------

* Params are sorted by key before the GET request is dispatched. This minor
change aims to improve server-side caching capabilities.
* Minor changes to the API of the function `httpbroker.get`. It now accepts a `auth` kwarg
to handle server-side authentication.
* Minor changes to `scieloapi.Connector`:
* A custom http broker can be passed as `http_broker` kwarg during init.
* Http methods are created dinamically during initialization, with user credentials bound
into it. Api_key is no longer maintained by the instance.
* `Client.fetch_relations` now accepts the param `only` to specify a subset of relations to fetch.
* Now the User-Agent is set to `scieloapi/:version`.
* The module `scieloapi.scieloapi` was renamed to `scieloapi.core` to make things clearer.
* Added POST method capabilities on endpoints.
* Added the exception `exceptions.MethodNotAllowed` to represent 405 status code.


0.3 (2013-08-02)
----------------

* Added more unit tests (Now at 73% of code coverage).
* Minor adjusts at `setup.py` installation script.
* New exceptions to represent http status codes.
* Better documentation at `http://docs.scielo.org/projects/scieloapipy/`.


0.2 (2013-07-26)
----------------

* Slumber dependency was removed. The module `scieloapi.httpbroker` was created
to deal with http requests and responses.
* Better test reports now using Nosetests + coverage.
* Added method `Client.fetch_relations` to fetch all first-level relations of
a document and replace the value by the full document.
Release History

Release History

0.5

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.4

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
scieloapi-0.5.tar.gz (11.1 kB) Copy SHA256 Checksum SHA256 Source Feb 10, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting