pyastroapi.articles¶
Module Contents¶
Classes¶
- class pyastroapi.articles.article(bibcode: str = None, data: Dict = None, bibtex: str = None, search: str = None)¶
- property export¶
- property metrics¶
- property visual¶
- property pdf¶
- property url¶
- property first_author: str¶
Return the first author of the paper.
- Returns:
_description_
- Return type:
str
- property authors: List[str]¶
Return a list of authors
- property name: str¶
Make a pretty name for the paper (First author year)
- property title: str¶
Return the paper title.
- Returns:
_description_
- Return type:
str
- from_bibcode(bibcode: str)¶
Set the article to point to the paper given by bibcode
- Parameters:
bibcode (str) – ADS bibcode
- from_data(data: Dict)¶
Initialize given a dict containing atleast a bibcode key
- Parameters:
data (t.Dict) – Dictionary of data
- from_bibtex(bibtex: str)¶
Initialize given a bibtex fragment
- Parameters:
bibtex (str) – A bibtex document as a string
- from_search(search: str)¶
Perform a search of ADS and return only the first result
- Parameters:
search (str) – An ADS search query
- abstract add_to_lib(library: str)¶
Add article to the ADS library
- Parameters:
library (str) – An existing ADS library
- Raises:
NotImplementedError – _description_
- __getattr__(attr: str)¶
- _identifer()¶
- keys()¶
Return all available fields
- Returns:
_description_
- Return type:
_type_
- items()¶
- values()¶
- __hash__()¶
Return hash(self).
- __eq__(value)¶
Return self==value.
- __str__()¶
Return str(self).
- __repr__()¶
Return repr(self).
- __dir__()¶
Default dir() implementation.
- as_dict()¶
- references()¶
Get a journal of references to this paper.
- Returns:
_description_
- Return type:
_type_
- reference_count() int¶
Get a count of the references to this paper.
- Returns:
_description_
- Return type:
int
- citations()¶
Get the citations to this paper.
- Returns:
_description_
- Return type:
_type_
- __getstate__()¶
- __setstate__(state)¶
- class pyastroapi.articles.journal(bibcodes: List = None, data: List = None, bibtex: str = None, search: str = None)¶
- property export¶
- property metrics¶
- property visual¶
- from_bibcodes(bibcodes: List)¶
Initialize from a list of bibcodes
- Parameters:
bibcodes (t.List) –
- Returns:
self
- from_data(data: List)¶
Initialize from a list of dict-like objects
Each element must have at least a “bibcode” key
- Parameters:
data (t.List) – List of dict-like objects
- from_bibtex(bibtex: str)¶
Initialize from a bibtex string
- Parameters:
bibtex (str) – A bibtex string of one or more bibtex’s
- from_search(search: str)¶
Initialize from an ADS search
- Parameters:
search (str) – ADS query string
- from_articles(data: List)¶
Initialize from list of articles
- Parameters:
data (t.List) – List of articles
- add_bibcode(bibcode: List)¶
Add papers given by bibcodes
- Parameters:
bibcode (t.List) – List of bibcodes
- add_data(data: List)¶
Add papers from list of dict-like objects
- Parameters:
data (t.List) – List of dict-like objects. Each element must have at least “bibcode” as a key
- add_articles(data: List)¶
Add papers from a list of articles
- Parameters:
data (t.List) – List of articles
- add_bibtex(bibtex: str)¶
Add papers from bibtex
- Parameters:
bibtex (str) – One of more bibtex’s
- bibcodes()¶
Returns the list of bibcodes in the journal
- Returns:
List of bibcodes
- Return type:
bibcodes (list)
- __getitem__(bibcode)¶
- __len__()¶
- keys()¶
Return list of keys (bibcodes)
- items()¶
Returns the items (bibcode and article) for each paper.
- values()¶
Return stored values
- Returns:
_description_
- Return type:
_type_
- __contains__(key: str)¶
- __iter__()¶
- __dir__()¶
Default dir() implementation.
- __getattr__(attr)¶
- pop(bibcodes)¶
Remove one or more bibcodes
- Parameters:
bibcodes (str or list[str]) – One or more bibcodes to remove
- __str__()¶
Return str(self).
- __getstate__()¶
- __setstate__(state)¶
- citations()¶
Get the citations to all papers in journal.
This does remove duplicates
- Returns:
_description_
- Return type:
_type_
- references()¶
Get the references to all papers in the journal
This does remove duplicates
- Returns:
_description_
- Return type:
_type_
- citation_count(uniq=False) int¶
Return count of citations to all papers in journal
- Parameters:
uniq (bool, optional) – If true remove duplicated citations. Defaults to False.
- Returns:
Count of all citations
- Return type:
int
- reference_count(uniq=False) int¶
Return count of references to all papers in journal
- Parameters:
uniq (bool, optional) – If true remove duplicated references. Defaults to False.
- Returns:
Count of all references
- Return type:
int