|
| 1 | +.. This file is automatically generated. Do not edit this file directly. |
| 2 | +
|
| 3 | +Cloud Healthcare API Python Samples |
| 4 | +=============================================================================== |
| 5 | + |
| 6 | +.. image:: https://gstatic.com/cloudssh/images/open-btn.png |
| 7 | + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=healthcare/api-client/datasets/README.rst |
| 8 | + |
| 9 | + |
| 10 | +This directory contains samples for Cloud Healthcare API. `Cloud Healthcare API`_ implements healthcare-native protocols and formats to accelerate ingestion, storage, analysis, and integration of healthcare data with cloud-based applications. |
| 11 | +- See the `migration guide`_ for information about migrating to Python client library v0.25.1. |
| 12 | + |
| 13 | +.. _migration guide: https://cloud.google.com/vision/docs/python-client-migration |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | +.. _Cloud Healthcare API: https://cloud.google.com/healthcare/docs |
| 19 | + |
| 20 | +Setup |
| 21 | +------------------------------------------------------------------------------- |
| 22 | + |
| 23 | + |
| 24 | +Authentication |
| 25 | +++++++++++++++ |
| 26 | + |
| 27 | +This sample requires you to have authentication setup. Refer to the |
| 28 | +`Authentication Getting Started Guide`_ for instructions on setting up |
| 29 | +credentials for applications. |
| 30 | + |
| 31 | +.. _Authentication Getting Started Guide: |
| 32 | + https://cloud.google.com/docs/authentication/getting-started |
| 33 | + |
| 34 | +Install Dependencies |
| 35 | +++++++++++++++++++++ |
| 36 | + |
| 37 | +#. Clone python-docs-samples and change directory to the sample directory you want to use. |
| 38 | + |
| 39 | + .. code-block:: bash |
| 40 | +
|
| 41 | + $ git clone https://github.com/GoogleCloudPlatform/python-docs-samples.git |
| 42 | +
|
| 43 | +#. Install `pip`_ and `virtualenv`_ if you do not already have them. You may want to refer to the `Python Development Environment Setup Guide`_ for Google Cloud Platform for instructions. |
| 44 | + |
| 45 | + .. _Python Development Environment Setup Guide: |
| 46 | + https://cloud.google.com/python/setup |
| 47 | + |
| 48 | +#. Create a virtualenv. Samples are compatible with Python 2.7 and 3.4+. |
| 49 | + |
| 50 | + .. code-block:: bash |
| 51 | +
|
| 52 | + $ virtualenv env |
| 53 | + $ source env/bin/activate |
| 54 | +
|
| 55 | +#. Install the dependencies needed to run the samples. |
| 56 | + |
| 57 | + .. code-block:: bash |
| 58 | +
|
| 59 | + $ pip install -r requirements.txt |
| 60 | +
|
| 61 | +.. _pip: https://pip.pypa.io/ |
| 62 | +.. _virtualenv: https://virtualenv.pypa.io/ |
| 63 | + |
| 64 | +Samples |
| 65 | +------------------------------------------------------------------------------- |
| 66 | + |
| 67 | +Datasets |
| 68 | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| 69 | + |
| 70 | +.. image:: https://gstatic.com/cloudssh/images/open-btn.png |
| 71 | + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=healthcare/api-client/datasets/datasets.py,healthcare/api-client/datasets/README.rst |
| 72 | + |
| 73 | + |
| 74 | + |
| 75 | + |
| 76 | +To run this sample: |
| 77 | + |
| 78 | +.. code-block:: bash |
| 79 | +
|
| 80 | + $ python datasets.py |
| 81 | +
|
| 82 | + usage: datasets.py [-h] [--project_id PROJECT_ID] |
| 83 | + [--cloud_region CLOUD_REGION] |
| 84 | + [--dataset_id DATASET_ID] [--time_zone TIME_ZONE] |
| 85 | + [--destination_dataset_id DESTINATION_DATASET_ID] |
| 86 | + [--keeplist_tags KEEPLIST_TAGS] [--member MEMBER] |
| 87 | + [--role ROLE] |
| 88 | + {create-dataset,delete-dataset,get-dataset,list-datasets,patch-dataset,get_iam_policy,set_iam_policy,deidentify-dataset} |
| 89 | + ... |
| 90 | +
|
| 91 | + positional arguments: |
| 92 | + {create-dataset,delete-dataset,get-dataset,list-datasets,patch-dataset,get_iam_policy,set_iam_policy,deidentify-dataset} |
| 93 | + create-dataset Creates a dataset. |
| 94 | + delete-dataset Deletes a dataset. |
| 95 | + get-dataset Gets any metadata associated with a dataset. |
| 96 | + list-datasets Lists the datasets in the project. |
| 97 | + patch-dataset Updates dataset metadata. |
| 98 | + get_iam_policy Gets the IAM policy for the specified dataset. |
| 99 | + set_iam_policy Sets the IAM policy for the specified dataset. A |
| 100 | + single member will be assigned a single role. A member |
| 101 | + can be any of: - allUsers, that is, anyone - |
| 102 | + allAuthenticatedUsers, anyone authenticated with a |
| 103 | + Google account - user:email, as in |
| 104 | + 'user:[email protected]' - group:email, as in |
| 105 | + 'group:[email protected]' - domain:domainname, as in |
| 106 | + 'domain:example.com' - serviceAccount:email, as in |
| 107 | + 'serviceAccount:my-other- |
| 108 | + [email protected]' A role can be any IAM |
| 109 | + role, such as 'roles/viewer', 'roles/owner', or |
| 110 | + 'roles/editor' |
| 111 | + deidentify-dataset Creates a new dataset containing de-identified data |
| 112 | + from the source dataset. |
| 113 | +
|
| 114 | + optional arguments: |
| 115 | + -h, --help show this help message and exit |
| 116 | + --project_id PROJECT_ID |
| 117 | + GCP project name |
| 118 | + --cloud_region CLOUD_REGION |
| 119 | + GCP cloud region |
| 120 | + --dataset_id DATASET_ID |
| 121 | + Name of dataset |
| 122 | + --time_zone TIME_ZONE |
| 123 | + The default timezone used by a dataset |
| 124 | + --destination_dataset_id DESTINATION_DATASET_ID |
| 125 | + The name of the new dataset where the de-identified |
| 126 | + data will be written |
| 127 | + --keeplist_tags KEEPLIST_TAGS |
| 128 | + The data to keeplist, for example "PatientID" or |
| 129 | + "StudyInstanceUID" |
| 130 | + --member MEMBER Member to add to IAM policy (e.g. |
| 131 | + "domain:example.com") |
| 132 | + --role ROLE IAM Role to give to member (e.g. "roles/viewer") |
| 133 | +
|
| 134 | +
|
| 135 | +
|
| 136 | +
|
| 137 | +
|
| 138 | +The client library |
| 139 | +------------------------------------------------------------------------------- |
| 140 | + |
| 141 | +This sample uses the `Google Cloud Client Library for Python`_. |
| 142 | +You can read the documentation for more details on API usage and use GitHub |
| 143 | +to `browse the source`_ and `report issues`_. |
| 144 | + |
| 145 | +.. _Google Cloud Client Library for Python: |
| 146 | + https://googlecloudplatform.github.io/google-cloud-python/ |
| 147 | +.. _browse the source: |
| 148 | + https://github.com/GoogleCloudPlatform/google-cloud-python |
| 149 | +.. _report issues: |
| 150 | + https://github.com/GoogleCloudPlatform/google-cloud-python/issues |
| 151 | + |
| 152 | + |
| 153 | +.. _Google Cloud SDK: https://cloud.google.com/sdk/ |
0 commit comments