All Projects → sckott → Habanero

sckott / Habanero

Licence: mit
client for Crossref search API

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Habanero

Exiftool
ExifTool meta information reader/writer
Stars: ✭ 832 (+824.44%)
Mutual labels:  api, metadata
The Seo Framework
The SEO Framework WordPress plugin.
Stars: ✭ 329 (+265.56%)
Mutual labels:  api, metadata
Rcrossref
R client for various CrossRef APIs
Stars: ✭ 137 (+52.22%)
Mutual labels:  api, metadata
Ipdata
🌐 An IP lookup system utilizing open datasets
Stars: ✭ 58 (-35.56%)
Mutual labels:  api, metadata
Libceed
CEED Library: Code for Efficient Extensible Discretizations
Stars: ✭ 90 (+0%)
Mutual labels:  api
Omnetpp primer
OMNeT++的仿真手册
Stars: ✭ 89 (-1.11%)
Mutual labels:  api
Graphql Portal
Configurable and distributed GraphQL Gateway. Convert your legacy data sources or monitor your existing GraphQL Services with a visual dashboard.
Stars: ✭ 88 (-2.22%)
Mutual labels:  api
Japidocs
A magical api documentation generator without annotation for springboot.
Stars: ✭ 1,289 (+1332.22%)
Mutual labels:  api
Python Nomad
Client library Hashicorp Nomad
Stars: ✭ 90 (+0%)
Mutual labels:  api
Go Tgbot
Golang telegram bot API wrapper, session-based router and middleware
Stars: ✭ 90 (+0%)
Mutual labels:  api
Patrowlhears
PatrowlHears - Vulnerability Intelligence Center / Exploits
Stars: ✭ 89 (-1.11%)
Mutual labels:  api
Ccxt.net
CCXT.NET – CryptoCurrency eXchange Trading Library for .NET
Stars: ✭ 89 (-1.11%)
Mutual labels:  api
Ppgo api demo gin
API接口应用Demo 基于Gin
Stars: ✭ 90 (+0%)
Mutual labels:  api
Shst
强智教务API & 山科小站
Stars: ✭ 89 (-1.11%)
Mutual labels:  api
Wordpress Seo
Yoast SEO for WordPress
Stars: ✭ 1,301 (+1345.56%)
Mutual labels:  metadata
Telemeta
Collaborative content management system for musicology
Stars: ✭ 88 (-2.22%)
Mutual labels:  metadata
Carbon Api
Unofficial API for generating beautiful images of your source code using Carbon.
Stars: ✭ 89 (-1.11%)
Mutual labels:  api
Run
⚡The resource runtime
Stars: ✭ 90 (+0%)
Mutual labels:  api
Laravel Prefixed Ids
Friendly prefixed IDs for Laravel models
Stars: ✭ 88 (-2.22%)
Mutual labels:  api
Bdapi
[bd] Api add-on for XenForo
Stars: ✭ 89 (-1.11%)
Mutual labels:  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 <https://github.com/CrossRef/rest-api-doc>__

Other Crossref API clients:

  • Ruby: serrano, <https://github.com/sckott/serrano>__
  • R: rcrossref, <https://github.com/ropensci/rcrossref>__

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

Note about searching:

You are using the Crossref search API described at https://github.com/CrossRef/rest-api-doc. 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

.. code-block:: console

pip (or pip3) install habanero

Dev version

.. code-block:: console

pip (or pip3) install git+git://github.com/sckott/habanero.git#egg=habanero

# OR

git clone [email protected]:sckott/habanero.git
cd habanero
make install

Usage

Initialize a client

.. code-block:: python

from habanero import Crossref
cr = Crossref()

Works route

.. code-block:: python

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

.. code-block:: python

ids here is the Crossref Member ID; 98 = Hindawi

cr.members(ids = 98, works = True)

Citation counts

.. code-block:: python

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

Content negotiation - get citations in many formats

.. code-block:: python

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

  • Please note that this project is released with a Contributor Code of Conduct <https://github.com/sckott/habanero/blob/master/CODE_OF_CONDUCT.md>__. By participating in this project you agree to abide by its terms.
  • License: MIT; see LICENSE file <https://github.com/sckott/habanero/blob/master/LICENSE>__

.. |pypi| image:: https://img.shields.io/pypi/v/habanero.svg :target: https://pypi.python.org/pypi/habanero

.. |docs| image:: https://readthedocs.org/projects/habanero/badge/?version=latest :target: http://habanero.rtfd.org/

.. |ghactions| image:: https://github.com/sckott/habanero/workflows/Python/badge.svg :target: https://github.com/sckott/habanero/actions?query=workflow%3APython

.. |coverage| image:: https://codecov.io/gh/sckott/habanero/branch/master/graph/badge.svg?token=6RrgNAuQmR :target: https://codecov.io/gh/sckott/habanero

.. |black| image:: https://img.shields.io/badge/code%20style-black-000000.svg :target: https://github.com/psf/black

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].