Skip to main content

Python wrapper for the Zotero API

Project description

Build Status Coverage Status Wheel Status Supported Python versions Docs MIT licensed PyPI Version

Pyzotero: An API Client for the Zotero API

Quickstart

  1. pip install pyzotero or conda config --add channels conda-forge && conda install pyzotero
  2. You'll need the ID of the personal or group library you want to access:
    • Your personal library ID is available here, in the section Your userID for use in API calls
    • For group libraries, the ID can be found by opening the group's page: https://www.zotero.org/groups/groupname, and hovering over the group settings link. The ID is the integer after /groups/
  3. You'll also need to get an API key here
  4. Are you accessing your own Zotero library? library_type is 'user'
  5. Are you accessing a shared group library? library_type is 'group'.

Then:

from pyzotero import zotero
zot = zotero.Zotero(library_id, library_type, api_key)
items = zot.top(limit=5)
# we've retrieved the latest five top-level items in our library
# we can print each item's item type and ID
for item in items:
    print('Item: %s | Key: %s' % (item['data']['itemType'], item['data']['key']))

Documentation

Full documentation of available Pyzotero methods, code examples, and sample output is available on Read The Docs.

Installation

  • Using pip: pip install pyzotero (it's available as a wheel, and is tested on Python 2.7, 3.5, 3.6, 3.7, and 3.8)
  • Using Anaconda:conda config --add channels conda-forge && conda 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 .

Testing

Run test_zotero.py in the pyzotero/test directory, or, using Nose2, nose2 from the top-level directory.

Issues

The latest commits can be found on the dev branch, although new features are currently rare. If you encounter an error, please open an issue.

Pull Requests

Pull requests are welcomed. Please read the contribution guidelines. In particular, please base your PR on the dev branch.

Versioning

As of v1.0.0, Pyzotero is versioned according to Semver; version increments are performed as follows:

  1. MAJOR version will increment with incompatible API changes,
  2. MINOR version will increment when functionality is added in a backwards-compatible manner, and
  3. PATCH version will increment with backwards-compatible bug fixes.

Citation

Pyzotero has a DOI:
DOI
You may also cite Pyzotero using CITATION.bib.
A sample citation (APA 6th edition) might look like:

Stephan Hügel, The Pyzotero Authors (2019, May 18). urschrei/pyzotero: Version v1.3.15. http://doi.org/10.5281/zenodo.2917290

License

Pyzotero is licensed under the MIT license. See license.txt for details.

† This isn't strictly true: you only need an API key for personal libraries and non-public group libraries.

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

Pyzotero-1.4.16.tar.gz (36.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

Pyzotero-1.4.16-py2.py3-none-any.whl (27.2 kB view details)

Uploaded Python 2Python 3

File details

Details for the file Pyzotero-1.4.16.tar.gz.

File metadata

  • Download URL: Pyzotero-1.4.16.tar.gz
  • Upload date:
  • Size: 36.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.3

File hashes

Hashes for Pyzotero-1.4.16.tar.gz
Algorithm Hash digest
SHA256 b1225e6e07d733ea38ba3b837486ace554a4e6cb8bc5a54e749b015a7fa493b1
MD5 1511667375addf2eb5a56fb84eb8148a
BLAKE2b-256 4058db39a4e7e765f271b199f1947165f0d9f24cfc69dee76d10792ae3b7830c

See more details on using hashes here.

File details

Details for the file Pyzotero-1.4.16-py2.py3-none-any.whl.

File metadata

  • Download URL: Pyzotero-1.4.16-py2.py3-none-any.whl
  • Upload date:
  • Size: 27.2 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.3

File hashes

Hashes for Pyzotero-1.4.16-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 9d9865c1e1b01d8e82bcc92c47a71ad37a7c800082230e2361a27d7cd7b25181
MD5 5309db499fff9ffd7d5513817f5ebcac
BLAKE2b-256 f57b98884059c43f70d6bd0606aa5d2affe8e5ce8a8191b27ef67e9f85a5b24a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page