Python wrapper for extracting content from Scirate.
Project description
scirate
Python wrapper for extracting information from Scirate :microscope:
This package provides a Python interface for the Scirate website.
Dependencies
This package depends on the following packages:
bs4
lxml
requests
They can be installed using pip.
sudo pip install -r requirements.txt
If you want to contribute to this package, you will need the nose package as well.
Installation
The preferred way to install the scirate package is via pip
sudo pip install scirate
Alternatively to install, you may also run the following command from the top-level package directory.
sudo python setup.py install
Examples
This package provides a Python interface for interfacing with the Scirate website. Here are a few examples demonstrating how to access data on Scirate.
Clients
In order to interface with the content on Scirate, we start off my creating a client. This client will be responsible for requesting information from Scirate and will serve as the intermediary for requesting and obtaining data.
from scirate.client import ScirateClient
client = ScirateClient()
Papers
Let us access a paper on Scirate via the arXiv identifier. Say we want to access information via Scirate on the following listing 1509.01147.
We can grab some of the basic information, such as the authors, title, abstract, arXiv category, etc.
>>> from scirate.paper import SciratePaper
>>> paper = client.paper("1509.01147")
>>> "The Information Paradox for Black Holes"
>>> paper.authors
>>> ['S. W. Hawking']
>>> paper.abstract[0:50]
>>> "I propose that the information loss paradox can be"
>>> paper.category
>>> "hep-th"
We can also grab some of the more Scirate-specific metrics. Such as the number of scites for a given article, who scited the article, etc.
>>> paper.scites
>>> 6
>>> paper.scitors
>>> ['Andrew Childs', 'Jonny', 'Mehdi Ahmadi', 'Noon van der Silk', 'Ryan L. Mann', 'Tom Wong']
Consult the documentation for further examples of information that can be obtained from a paper.
Categories
One may also wish to look at papers under various arXiv identifier listings on Scirate. For instance, one may wish to find all of the papers posted under the ‘quant-ph’ category posted on September 7, 2017.
>>> from scirate.category import ScirateCategory
>>> category = client.category("quant-ph", "09-07-2017")
>>> category.papers[0:2]
>>> ['Quantum Advantage from Conjugated Clifford Circuits', 'Extended Nonlocal Games from Quantum-Classical Games']
Documentation
Read more about this package here.
Contribution
If you find an API method that is not supported by this package, feel free to create a Github issue. Also, you are more than welcome to submit a pull request for a bug fix or additional feature.
License
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
File details
Details for the file scirate-0.0.7.tar.gz
.
File metadata
- Download URL: scirate-0.0.7.tar.gz
- Upload date:
- Size: 9.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a24b79bc6d5b2766a407bcc5a5f0f30e5ff756e134e451e9f0ebbd97678b078 |
|
MD5 | 3f1e237b97315a215f27749141670084 |
|
BLAKE2b-256 | e650de22c21dc2ddfc55b244026d8ee140eb1b2979f40386d5399e1529e6b647 |