coauthors package

Submodules

coauthors.grab module

coauthors.grab.author_names(query_result)[source]

Iterate over author(s) from scholarly query.

coauthors.grab.confirm_author_name(author_options) int[source]

Provides option to check if query by name is correct.

Parameters:

author_options (list) – list of authors with the queried names.

Returns:

selected (int)

coauthors.grab.get_coauthors(author) DataFrame[source]

Grab the coauthors for a scholarly returned author.

coauthors.grab.main(args)[source]

Wrapper allowing query_author_by_id() or query_author_by_name() to be called with string arguments in a CLI fashion.

Parameters:

args (List[str]) – command line parameters as list of strings (for example ["--verbose", "42"]).

coauthors.grab.parse_args(args)[source]

Parse command line parameters

Parameters:

args (List[str]) – command line parameters as list of strings (for example ["--help"]).

Returns:

command line parameters namespace

Return type:

argparse.Namespace

coauthors.grab.query_author_by_id(scholar_id)[source]

Use google scholar id to query.

coauthors.grab.query_author_by_name(name, institute=None)[source]

Use author name and/or intitute to query.

coauthors.grab.run()[source]

Calls main() passing the CLI arguments extracted from sys.argv

This function can be used as entry point to create console scripts with setuptools.

coauthors.grab.save_csv(outfile, author)[source]

Save coauthor list to csv file

Parameters:
  • outfile (str) – path to output file.

  • author (dict) – scholarly result for author.

coauthors.grab.setup_logging(loglevel)[source]

Setup basic logging

Parameters:

loglevel (int) – minimum loglevel for emitting messages

Module contents