ArXiv

Arxiv extension.

Arxiv extension is initialized like this:

>>> from flask import Flask
>>> from invenio.ext.arxiv import Arxiv
>>> app = Flask("myapp")
>>> ext = Arxiv(app=app)

Configuration Settings

The details of the ArXiv URL and endpoint can be customized in the application settings.

ARXIV_API_URL The URL of ArXiV query API. Default: http://export.arxiv.org/oai2
ARXIV_ENDPOINT The name of Flask endpoint for new application route. If the value is False (or None) the url rule is not registered. Default: _arxiv.search
ARXIV_URL_RULE The URL for ARXIV_ENPOINT (i.e. url_for(current_app.config[‘ARXIV_ENDPOINT’]) is equal to current_app.config[‘ARXIV_ENDPOINT’]). Default: /arxiv/search
class invenio.ext.arxiv.Arxiv(app=None)

Arxiv extension implementation.

Initialization of the extension:

>>> from flask import Flask
>>> from invenio.ext.arxiv import Arxiv
>>> app = Flask("myapp")
>>> ext = Arxiv(app=app)

or alternatively using the factory pattern:

>>> app = Flask("myapp")
>>> ext = Arxiv()
>>> ext.init_app(app)
get_json(arxiv_id)

Get ArXiv json data.

get_response(arxiv_id)

Get ArXiv response from the ARXIV_API_URL page.

init_app(app)

Initialize a Flask application.

search(arxiv=None)

Search for given ArXiv ID.