Hello! Pyzotero now uses Requests
in place of the detestable urllib2
. If you'd like to help me to test it, install HEAD from the dev
branch:
pip install -e git://github.com/urschrei/pyzotero.git@dev#egg=pyzotero
Disclaimer: this may break everything. Only install from the dev
branch if you're comfortable with mild instability. The use of a virtualenv
is encouraged.
from pyzotero import zotero
zot = zotero.Zotero(library_id, library_type, api_key)
items = zot.top(limit=5)
# we have now retrieved the last five top-level items in our library
# we can print each item's item type and ID
for item in items:
print 'Item Type: %s | Key: %s' % (item['itemType'], item['key'])
Pyzotero is a Python wrapper for the Zotero read and write APIs. You'll require a library ID and access key, which can be set up here.
See Read The Docs for full documentation of available Pyzotero methods, code examples, and sample output.
- using pip:
pip install pyzotero
- From a local clone, if you wish to install Pyzotero from a specific branch:
Example:
git clone git://github.com/urschrei/pyzotero.git
cd pyzotero
git checkout dev
pip install .
- Alternatively, download the latest version from https://github.com/urschrei/pyzotero/downloads, and point pip at the zip file:
Example:pip install ~/Downloads/urschrei-pyzotero-v0.3-0-g04ff544.zip
Installation using easy_install
may be successful, but is neither tested nor officially supported – pip is the preferred method.
Run tests.py
in the pyzotero
directory, or, using Nose, nosetests
from the top-level directory.
Pyzotero remains in development as of March 2013. The latest commits can be found on the dev branch. If you encounter an error, please open an issue.
Pull requests are welcomed. Please read the contribution guidelines.
Pyzotero is licensed under version 3 of the GNU General Public License. See license.txt
for details.