astro query:docs

- Index
- Modules

### Navigation

- next »
- « previous |
- astroquery v0.4.11 »
- TAP/TAP+ (`astroquery.utils.tap`) »
- TapPlus

# TapPlus

class astroquery.utils.tap.TapPlus(*, url=None, host=None, server_context=None, tap_context=None, port=80, sslport=443, default_protocol_is_https=False, connhandler=None, upload_context=None, table_edit_context=None, data_context=None, datalink_context=None, verbose=False, client_id=None, use_names_over_ids=False)

  Bases: `Tap`

  TAP plus class Provides TAP and TAP+ capabilities

  Constructor

  Parameters:
    url str, mandatory if no host is specified, default None

      TAP URL

    host str, optional, default None

      host name

    server_context str, optional, default None

      server context

    tap_context str, optional, default None

      tap context

    upload_context str, optional, default None

      upload context

    table_edit_context str, optional, default None

      context for all actions to be performed over a existing table

    data_context str, optional, default None

      data context

    datalink_context str, optional, default None

      datalink context

    port int, optional, default ‘80’

      HTTP port

    sslport int, optional, default ‘443’

      HTTPS port

    default_protocol_is_https bool, optional, default False

      Specifies whether the default protocol to be used is HTTPS

    connhandler connection handler object, optional, default None

      HTTP(s) connection hander (creator). If no handler is provided, a new one is created.

    use_names_over_ids When `True` use the `name` attributes of columns as the

      names of columns in the `astropy.table.Table` instance. Since names are not guaranteed to be unique, this may cause some columns to be renamed by appending numbers to the end. Otherwise (default), use the ID attributes as the column names.

    verbose bool, optional, default ‘True’

      flag to display information about the process

  Methods Summary

  `delete_user_table`(*[, table_name, ...]) | Removes a user table
  `get_args_4_rename_table`(table_name, ...[, ...]) |
  `get_current_column_values_for_update`(column) |
  `get_datalinks`(ids, *[, linking_parameter, ...]) | Gets datalinks associated to the provided identifiers
  `get_new_column_values_for_update`(...) |
  `get_table_update_arguments`(table_name, ...) |
  `is_valid_user`(*[, user_id, verbose]) | Determines if the specified user exists in the system TAP+ only
  `load_data`(*[, params_dict, output_file, verbose]) | Loads the specified data
  `load_group`(*[, group_name, verbose]) | Load group with title being group_name
  `load_groups`(*[, verbose]) | Loads groups
  `load_shared_items`(*[, verbose]) | Loads shared items
  `load_tables`(*[, only_names, ...]) | Loads all public tables
  `login`(*[, user, password, credentials_file, ...]) | Performs a login.
  `login_gui`(*[, verbose]) | Performs a login using a GUI dialog
  `logout`(*[, verbose]) | Performs a logout
  `remove_jobs`(jobs_list, *[, verbose]) | Removes the specified jobs
  `rename_table`(*[, table_name, ...]) | This method allows you to update the column names of a user table.
  `set_ra_dec_columns`(*[, table_name, ...]) | Set columns of a table as ra and dec respectively a user table
  `share_group_add_user`(*[, group_name, ...]) | Adds user to a group
  `share_group_create`(*[, group_name, ...]) | Creates a group
  `share_group_delete`(*[, group_name, verbose]) | Deletes a group
  `share_group_delete_user`(*[, group_name, ...]) | Deletes user from a group
  `share_table`(*[, group_name, table_name, ...]) | Shares a table with a group
  `share_table_stop`(*[, group_name, ...]) | Stop sharing a table
  `update_user_table`(*[, table_name, ...]) | Updates a user table
  `upload_table`(*[, upload_resource, ...]) | Uploads a table to the user private space
  `upload_table_from_job`(*[, job, table_name, ...]) | Creates a table to the user private space from a job

  Methods Documentation

  delete_user_table(*, table_name=None, force_removal=False, verbose=False)

    Removes a user table

    Parameters:
      table_name str, required

        table to be removed

      force_removal bool, optional, default ‘False’

        flag to indicate if removal should be forced

      verbose bool, optional, default ‘False’

        flag to display information about the process

  get_args_4_rename_table(table_name, new_table_name, new_column_names_dict={})
  static get_current_column_values_for_update(column)
  get_datalinks(ids, *, linking_parameter=None, verbose=False)

    Gets datalinks associated to the provided identifiers

    Parameters:
      ids str list, mandatory

        list of identifiers

      linking_parameter str, optional, default SOURCE_ID, valid values: SOURCE_ID, TRANSIT_ID, IMAGE_ID

        By default, all the identifiers are considered as source_id SOURCE_ID: the identifiers are considered as source_id TRANSIT_ID: the identifiers are considered as transit_id IMAGE_ID: the identifiers are considered as sif_observation_id

      verbose bool, optional, default ‘False’

        flag to display information about the process

    Returns:
      A table object
  static get_new_column_values_for_update(list_of_changes, column_name, c_flags, c_indexed, c_ucd, c_utype)
  static get_table_update_arguments(table_name, columns, list_of_changes)
  is_valid_user(*, user_id=None, verbose=False)

    Determines if the specified user exists in the system TAP+ only

    Parameters:
      user_id str, mandatory

        user id to be checked

      verbose bool, optional, default ‘False’

        flag to display information about the process

    Returns:
      Boolean indicating if the specified user exists
  load_data(*, params_dict=None, output_file=None, verbose=False)

    Loads the specified data

    Parameters:
      params_dict dictionary, mandatory

        list of request parameters

      output_file string, optional, default None

        file where the results are saved. If it is not provided, the http response contents are returned.

      verbose bool, optional, default ‘False’

        flag to display information about the process

    Returns:
      A table object if output_file is None.
      None if output_file is not None.
  load_group(*, group_name=None, verbose=False)

    Load group with title being group_name

    Parameters:
      group_name str, required

        group to be loaded

      verbose bool, optional, default ‘False’

        flag to display information about the process

    Returns:
      A group with title being group_name
  load_groups(*, verbose=False)

    Loads groups

    Parameters:
      verbose bool, optional, default ‘False’

        flag to display information about the process

    Returns:
      A set of groups of a user
  load_shared_items(*, verbose=False)

    Loads shared items

    Parameters:
      verbose bool, optional, default ‘False’

        flag to display information about the process

    Returns:
      A set of shared items
  load_tables(*, only_names=False, include_shared_tables=False, verbose=False)

    Loads all public tables

    Parameters:
      only_names bool, TAP+ only, optional, default ‘False’

        True to load table names only

      include_shared_tables bool, TAP+, optional, default ‘False’

        True to include shared tables

      verbose bool, optional, default ‘False’

        flag to display information about the process

    Returns:
      A list of table objects
  login(*, user=None, password=None, credentials_file=None, verbose=False)

    Performs a login. User and password arguments can be used or a file that contains user name and password (2 lines: one for user name and the following one for the password). If no arguments are provided, a prompt asking for user name and password will appear.

    Parameters:
      user str, default None

        login name

      password str, default None

        user password

      credentials_file str, default None

        file containing user and password in two lines

      verbose bool, optional, default ‘False’

        flag to display information about the process

  login_gui(*, verbose=False)

    Performs a login using a GUI dialog

    Parameters:
      verbose bool, optional, default ‘False’

        flag to display information about the process

  logout(*, verbose=False)

    Performs a logout

    Parameters:
      verbose bool, optional, default ‘False’

        flag to display information about the process

  remove_jobs(jobs_list, *, verbose=False)

    Removes the specified jobs

    Parameters:
      jobs_list str, mandatory

        jobs identifiers to be removed

      verbose bool, optional, default ‘False’

        flag to display information about the process

  rename_table(*, table_name=None, new_table_name=None, new_column_names_dict=None, verbose=False)

    This method allows you to update the column names of a user table.

    Parameters:
      table_name: str, required

        old name of the user’s table

      new_table_name: str, required

        new name of the user’s table

      new_column_names_dict: dict str:str

        dict with pairs “old_column1_name:new_column1_name”

      verbose bool, optional, default ‘False’

        flag to display information about the process

  set_ra_dec_columns(*, table_name=None, ra_column_name=None, dec_column_name=None, verbose=False)

    Set columns of a table as ra and dec respectively a user table

    Parameters:
      table_name str

        table to be set

      ra_column_name str

        ra column to be set

      dec_column_name str

        dec column to be set

      verbose bool, optional, default ‘False’

        flag to display information about the process

  share_group_add_user(*, group_name=None, user_id=None, verbose=False)

    Adds user to a group

    Parameters:
      group_name str, required

        group which user_id will be added in

      user_id str, required

        user id to be added

      verbose bool, optional, default ‘False’

        flag to display information about the process

  share_group_create(*, group_name=None, description=None, verbose=False)

    Creates a group

    Parameters:
      group_name str, required

        group to be created

      description str, required

        description of the group

      verbose bool, optional, default ‘False’

        flag to display information about the process

  share_group_delete(*, group_name=None, verbose=False)

    Deletes a group

    Parameters:
      group_name str, required

        group to be created

      verbose bool, optional, default ‘False’

        flag to display information about the process

  share_group_delete_user(*, group_name=None, user_id=None, verbose=False)

    Deletes user from a group

    Parameters:
      group_name str, required

        group which user_id will be removed from

      user_id str, required

        user id to be deleted

      verbose bool, optional, default ‘False’

        flag to display information about the process

  share_table(*, group_name=None, table_name=None, description=None, verbose=False)

    Shares a table with a group

    Parameters:
      group_name str, required

        group in which table will be shared

      table_name str, required

        table to be shared

      description str, required

        description of the sharing

      verbose bool, optional, default ‘False’

        flag to display information about the process

  share_table_stop(*, group_name=None, table_name=None, verbose=False)

    Stop sharing a table

    Parameters:
      group_name str, required

        group where the table is shared to

      table_name str, required

        table to be stopped from being shared

      verbose bool, optional, default ‘False’

        flag to display information about the process

  update_user_table(*, table_name=None, list_of_changes=(), verbose=False)

    Updates a user table

    Parameters:
      table_name str

        table to be updated

      list_of_changes list

        list of lists, each one of them containing sets of [column_name, field_name, value]. column_name is the name of the column to be updated field_name is the name of the tap field to be modified field name can be ‘utype’, ‘ucd’, ‘flags’ or ‘indexed’ value is the new value this field of this column will take

      verbose bool, optional, default ‘False’

        flag to display information about the process

  upload_table(*, upload_resource=None, table_name=None, table_description=None, format=None, verbose=False)

    Uploads a table to the user private space

    Parameters:
      upload_resource object, mandatory

        table to be uploaded: pyTable, file or URL.

      table_name str, required if uploadResource is provided, default None

        resource temporary table name associated to the uploaded resource

      table_description str, optional, default None

        table description

      format str, optional, default ‘votable’

        resource format. Only formats described in https://docs.astropy.org/en/stable/io/unified.html#built-in-table-readers-writers are accepted.

      verbose bool, optional, default ‘False’

        flag to display information about the process

  upload_table_from_job(*, job=None, table_name=None, table_description=None, verbose=False)

    Creates a table to the user private space from a job

    Parameters:
      job: job, mandatory

        job used to create a table. Could be a string with the jobid or a job itself

      table_name str, default ‘t’+jobid

        resource temporary table name associated to the uploaded resource

      table_description str, optional, default None

        table description

      verbose bool, optional, default ‘False’

        flag to display information about the process