ads.utils

General utilities.

Functions

flatten(struct)

Create a flat list of all items in the structure.

parse_bibcode(bibcode)

Parse a bibcode and return a dictionary with the parsed data.

setup_database()

Set up the local database for Journals and Affiliations.

to_bibcode(iterable)

Return a bibcode for each item in the iterable.

ads.utils.parse_bibcode(bibcode: str) dict[source]

Parse a bibcode and return a dictionary with the parsed data.

See https://ui.adsabs.harvard.edu/help/actions/bibcode

ads.utils.flatten(struct: collections.abc.Iterable) list[source]

Create a flat list of all items in the structure.

ads.utils.to_bibcode(iterable)[source]

Return a bibcode for each item in the iterable.

The iterable could contain ads.Document objects, bibcode strings, etc.

ads.utils.setup_database()[source]

Set up the local database for Journals and Affiliations.