• Stars
    star
    190
  • Rank 203,739 (Top 5 %)
  • Language
    Python
  • License
    MIT License
  • Created about 9 years ago
  • Updated 4 months ago

Reviews

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

Repository Details

client for Crossref search API

habanero

pypi docs ghactions coverage black

This is a low level client for working with Crossref's search API. It's been named to be more generic, as other organizations are/will adopt Crossref's search API, making it possible to interact with all from one client.

Crossref API docs

Other Crossref API clients:

Crossref's API issue tracker: https://gitlab.com/crossref/issues

habanero includes three modules you can import as needed (or import all):

Crossref - Crossref search API. The Crossref module includes methods matching Crossref API routes, and a few convenience methods for getting DOI agency and random DOIs:

  • works - /works route
  • members - /members route
  • prefixes - /prefixes route
  • funders - /funders route
  • journals - /journals route
  • types - /types route
  • licenses - /licenses route
  • registration_agency - get DOI minting agency
  • random_dois - get random set of DOIs

counts - citation counts. Includes the single citation_count method

cn - content negotiation. Includes the methods:

  • content_negotiation - get citations in a variety of formats
  • csl_styles - get CSL styles, used in content_negotation method

WorksContainer - A class for handling Crossref works. Pass output of works from methods on the Crossref class to more easily extract specific fields of works.

Note about searching:

You are using the Crossref search API described at https://api.crossref.org/swagger-ui/index.html. When you search with query terms, on Crossref servers they are not searching full text, or even abstracts of articles, but only what is available in the data that is returned to you. That is, they search article titles, authors, etc. For some discussion on this, see https://gitlab.com/crossref/issues/-/issues/101

Rate limits

See the headers X-Rate-Limit-Limit and X-Rate-Limit-Interval for current rate limits.

The Polite Pool

To get in the polite pool it's a good idea now to include a mailto email address. See docs for more information.

Installation

Stable version

pip (or pip3) install habanero

Dev version

pip install git+https://github.com/sckott/habanero.git#egg=habanero

Or build it yourself locally

git clone https://github.com/sckott/habanero.git
cd habanero
make install

Usage

Initialize a client

from habanero import Crossref
cr = Crossref()

Works route

# query
x = cr.works(query = "ecology")
x['message']
x['message']['total-results']
x['message']['items']

# fetch data by DOI
cr.works(ids = '10.1371/journal.pone.0033693')

Members route

# ids here is the Crossref Member ID; 98 = Hindawi
cr.members(ids = 98, works = True)

Citation counts

from habanero import counts
counts.citation_count(doi = "10.1016/j.fbr.2012.01.001")

Content negotiation - get citations in many formats

from habanero import cn
cn.content_negotiation(ids = '10.1126/science.169.3946.635')
cn.content_negotiation(ids = '10.1126/science.169.3946.635', format = "citeproc-json")
cn.content_negotiation(ids = "10.1126/science.169.3946.635", format = "rdf-xml")
cn.content_negotiation(ids = "10.1126/science.169.3946.635", format = "text")
cn.content_negotiation(ids = "10.1126/science.169.3946.635", format = "text", style = "apa")
cn.content_negotiation(ids = "10.1126/science.169.3946.635", format = "bibentry")

Meta

More Repositories

1

cowsay

cowsay w/ more animals, in R
HTML
266
star
2

usdaplantsapi

DEFUNCT - REST API for the USDA Plants Database
TSQL
105
star
3

rphylopic

Get silhouettes of organisms from Phylopic.
R
77
star
4

rforcats

HTML
45
star
5

elastic_data

Elasticsearch datasets ready for bulk loading
37
star
6

request

http requests DSL for R
R
36
star
7

cchecksapi

CRAN checks API (DEFUNCT)
Ruby
33
star
8

pytaxize

python port of taxize (taxonomy toolbelt) for R
Python
31
star
9

serrano

Low level Ruby client for Crossref
Ruby
30
star
10

ftp

ftp for R
R
28
star
11

pdfimager

Extract images from pdfs using poppler <https://poppler.freedesktop.org/>
R
27
star
12

musemeta

R Client for scraping museum metadata
R
24
star
13

geoops

geoops does spatial operations on GeoJSON
C++
23
star
14

cites

Citation searching and retrieval
Ruby
17
star
15

mutant

mutation testing for R
R
16
star
16

fauxpas

fauxpas does http errors
R
15
star
17

apipkgen

Generate an R package from API specs
R
13
star
18

gggraph

Make graph/network plots with the ggplot2 package for R
R
11
star
19

webmiddens

cache http requests
R
10
star
20

httpcode

http status code investigation
R
9
star
21

recology

Code for the Recology blog
HTML
9
star
22

textmine

rOpenSci textmining manuscript
TeX
9
star
23

pytaxa

taxonomic classes for Python
Python
9
star
24

spenv

Combine environmental and spatial data
R
8
star
25

openadds

Openaddresses R client
R
8
star
26

pyminer

Text-mining toolset for Crossref data
Python
8
star
27

httping

Ping urls to time requests
R
8
star
28

beer_recipes

my beer recipes
HTML
8
star
29

spplit

connect species occurrence data to literature
R
7
star
30

parseids

Parse identifiers (e.g., DOIs)
C++
7
star
31

talks

my posters and talks
HTML
7
star
32

extcite

pull dois out of pdfs > content negotation > bib file
Ruby
7
star
33

discgolf

Discourse API R client
R
6
star
34

pubpatternsapi

PubPatterns REST API (DEFUNCT)
Ruby
6
star
35

pubpatterns

Lookup for full text urls
Ruby
6
star
36

rfna

Web page scraping for eFloras, including the Flora of North America
R
6
star
37

ridb

client for Index Database of remote sensing indices
HTML
6
star
38

splister

match species list against reference list
R
5
star
39

scott

My website
JavaScript
5
star
40

tpl-sqlite

ThePlantList as SQLite
R
4
star
41

auditopendata

audit open data in articles
4
star
42

rtaxamatch

taxamatch implementation in R
R
4
star
43

spplist

R
4
star
44

apisforcats

UNMAINTAINED
CSS
4
star
45

gbifms

manuscript covering rgbif, pygbif, and gbifrb
TeX
4
star
46

gbifrb

GBIF Ruby client; docs: http://www.rubydoc.info/gems/gbifrb/0.1.0
Ruby
4
star
47

textminer

text mine via Crossref's TDM
Ruby
4
star
48

ftdoi

Retrieve full-text urls on a per publisher basis
R
4
star
49

gbif-backbone-sql

GBIF Darwin Core taxonomic backbone to SQLite
Ruby
4
star
50

rforcatshex

Hex sticker for rforcats.net
4
star
51

bienapi

BIEN REST API
Ruby
4
star
52

resteasy

R
4
star
53

rwikispeedia

R interface to Wikispeedia
R
3
star
54

howmanyparams

3
star
55

catfact

demo pkg using vcr for httr testing
R
3
star
56

tecks

R
3
star
57

jqr

jq inspired json parsing
R
3
star
58

wdclients

Web Data R Clients
CSS
3
star
59

biodivcode

HTML
3
star
60

esamd

Materials for an #ESA2013 workshop on Markdown/git
CSS
3
star
61

mstext

Manuscript on rOpenSci scholarly text packages
TeX
2
star
62

IntWebData

Interface with the Interaction Web Database
2
star
63

shinyio

JavaScript
2
star
64

sxslt

R
2
star
65

nsidc

R
2
star
66

sacbox

Library of R functions from me and others
R
2
star
67

taxize

CSS
2
star
68

veyor

Appveyor API client for Ruby
Ruby
2
star
69

beer_recipes2

2
star
70

soylocs

restaurants that use soybean oil (mostly in portland), blarg!!!!
HTML
2
star
71

rgeojson

Files to convert to geojson in R
2
star
72

nameparser

R port of Ruby's biodiversity scientific name parser
Ruby
2
star
73

scientist

Experiment with changes R code, scripts or packages
R
2
star
74

turtles

2
star
75

pdftoolspdfs

1
star
76

rrocksdb

C++
1
star
77

egnar

European Nucleotide Archive R client
R
1
star
78

usgs

R interface to USGS APIs
R
1
star
79

rubfuns

playing with ruby functions in R
R
1
star
80

traitdb

https://traits.party
Ruby
1
star
81

apispecs

1
star
82

vcrhttr2

Testing Integeration of httr2 with vcr
R
1
star
83

isu-2016-11-16

HTML
1
star
84

tacksize

taxonomic library for Ruby
Ruby
1
star
85

func

Tools for function development
R
1
star
86

rubrb

helper cli methods for R package devs
Ruby
1
star
87

dendro

R
1
star
88

labnotebook

Open science notebook blog
1
star
89

gbids

Genbank ID checker/converter API - DOWN as of 2016-11-27
Ruby
1
star
90

SSOAP

R
1
star
91

pyalm_scott

Python
1
star
92

work

latex documents, etc.
OpenEdge ABL
1
star
93

foobar3

R
1
star
94

foobar2

1
star
95

taxspell

Spell Check Taxonomic Names
R
1
star
96

apistatus

adf
1
star
97

pyror

Research Organization Registry Python Client
Python
1
star
98

ncbi-common-tree

Shell
1
star
99

astr

R
1
star
100

canadiana

Canadiana R client
R
1
star