• Stars
    star
    749
  • Rank 58,345 (Top 2 %)
  • Language
    Python
  • License
    MIT License
  • Created about 13 years ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Pyzotero: a Python client for the Zotero API

Supported Python versions Docs MIT licensed PyPI Version Anaconda-Server Badge Downloads

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 3.7 and up)
  • 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 pytest . 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.cff.
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.

More Repositories

1

Geopython

Notebooks and libraries for spatial/geo Python explorations
Jupyter Notebook
338
star
2

simplification

Very fast Python line simplification using either the RDP or Visvalingam-Whyatt algorithm implemented in Rust
Python
152
star
3

CityEngine-Twitter

Visualise Twitter activity using a procedurally-generated 3D city model
Python
71
star
4

polylabel-rs

A Rust implementation of the Polylabel algorithm, with FFI.
Rust
48
star
5

convertbng

Fast, accurate WGS84 ⬅️➡️ OSGB36 (OSTN15) conversion, using Python and Rust
Python
37
star
6

pypolyline

Fast Google Polyline encoding and decoding using a Rust binary
Python
36
star
7

lonlat_bng

A multithreaded Rust library with FFI for converting WGS84 longitude and latitude coordinates into BNG (OSGB36) Eastings and Northings and vice versa (using OSTN15)
Rust
25
star
8

rdp

A library providing FFI access to fast Ramer–Douglas–Peucker and Visvalingam-Whyatt line simplification algorithms
Rust
20
star
9

router_comparison

Comparative explorations of the Bicycle journey characteristics calculated by the OSRM, Valhalla, and Google Maps routing engines
Python
16
star
10

geojson_example

Minimal examples of GeoJSON parsing using Rust
Rust
14
star
11

lovecraft

A basic NLTK demo, using the collected works of H. P. Lovecraft as a corpus
Jupyter Notebook
13
star
12

polylabel_cmd

A command-line utility for generating optimum polygon label coordinates from GeoJSON
Rust
12
star
13

hexagrams

Procedural generation of I Ching hexagrams and trigrams using PIL and NumPy
Python
10
star
14

linalg

Least-squares estimation (regression analysis) using Python (statsmodels and Pandas)
Jupyter Notebook
7
star
15

rust_anybar

A command-line Anybar client written in Rust
Rust
7
star
16

ckmeans

Optimal univariate k-means clustering using dynamic programming
Rust
6
star
17

geojson_d3

Make RFC 7946 GeoJSON (Multi)Polygons d3-geo-compatible, or vice versa
Rust
6
star
18

hexcover

Hexcover: tile an area with regular flat-topped hexagons
Python
6
star
19

cocktails

🍹Branch and bound solution using Rust to calculate an optimal cocktail ingredient list of arbitrary length 🍸
Rust
6
star
20

WIREs

Scientometric Analysis for a literature review article --->
Jupyter Notebook
5
star
21

Circles

Draw geodesic circles exhibiting projection distortion using Basemap
Python
5
star
22

Plowman

A Python script which tweets epic poetry from plain text files
Python
5
star
23

project-euler

Project Euler solutions
Python
4
star
24

Twitrends

Output top ten trending twitter topics to Growl, based on WOEID
Python
4
star
25

tweetstodb

Example script to log tweets from a set of Twitter users to a Postgres DB
Python
4
star
26

minimal_cross_manylinux

Example of a minimal CI setup using Cross to build a manylinux2010-compatible Rust binary
Rust
4
star
27

hovertube

TfL's rail lines, hovering, ghost-like in the sky above the city 👻
Jupyter Notebook
3
star
28

cleantwitter

Safari 5, Firefox 3, and Google Chrome 5 extensions which remove annoying ‘social’ features such as ‘Who to follow’ and ‘Trending’ topics from twitter.com
JavaScript
3
star
29

CDP

British Museum CDPP
Python
3
star
30

HH-Expunge

A Safari extension that allows users to be selectively ignored
JavaScript
3
star
31

edit_my_tilde

Send pull requests with content for my tilde.club page:
JavaScript
3
star
32

ostn15_phf

A Rust crate providing Ordnance Survey OSTN15 adjustments for ETRS89 coordinates
Rust
3
star
33

greggs

Greggs and Pret Heat Map
JavaScript
2
star
34

rustfest

My Rustfest 2016 slides
2
star
35

tweetmute

Twitter keyword mute regexes
2
star
36

mefignore

A Safari extension for ignoring MetaFilter users
JavaScript
1
star
37

rust_fizzbuzz

Implementing FizzBuzz using Rust 1.0
Rust
1
star
38

irishsecondaryschools

Irish Secondary Schools spatial- and metadata, 2022
1
star
39

urschrei

1
star
40

robust-wasm

WASM port of the robust crate
Rust
1
star
41

polyline-ffi

FFI Bindings for the rust-polyline crate
Rust
1
star
42

patterns

An example showing efficient matching of arbitrary ASCII string patterns in Rust
Rust
1
star