Make the instructions about credential setting clearer
"Run `Batch Processing API` to request data for an area of interest, and download the satellite products (bands and derived products) to an Amazon S3 Bucket."
]
},
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "### Sentinel Hub authentification and token\n",
+ "\n",
+ "In the following cells, we will set up the authentication parameters for the Sentinel Hub services. \n",
+ "\n",
+ "For the steps that use `eo-learn`, such as the conversion of the Bucket contents to EOPatches, we will use the convenient `SHConfig` class from the `sentinelhub-py` package. If you have already set up your credentials in the command line (see [documentation](https://sentinelhub-py.readthedocs.io/en/latest/configure.html#configuration)), then calling `SHConfig` should fill your variable with the necessary attributes allowing you to be identified. If you prefer assigning your credentials \"one-time\" in this workflow you can then assign the four following attributes in the class:\n",
+ "\n",
+ "- config.sh_client_id\n",
+ "- config.sh_client_secret\n",
+ "- config.aws_access_key_id\n",
+ "- config.aws_secret_access_key\n",
+ "\n",
+ "You can set these parameters directly in the code, or if you want to safely share your code, import them from a file and assign them to the `SHConfig` class."
+ ]
+ },
{
"cell_type": "code",
"execution_count": 2,
}
],
"source": [
+ "# If you were to assign your credentials in the code (it is better practice to call them\n",
+ "# from a file), you would uncomment the lines below:\n",
+ "#config.sh_client_id = \"my-sh-client-id\"\n",
+ "#config.sh_client_secret = \"my-sh-client-secret\"\n",
+ "#config.aws_access_key_id = \"my-amazon-client-id\"\n",
+ "#config.aws_secret_access_key = \"my-amazon-client-secret\"\n",
+ "\n",
"# Fetch information from the configuration tool python class\n",
"config = SHConfig()"
]
"cell_type": "markdown",
"metadata": {},
"source": [
- "### Sentinel Hub authentification and token\n",
+ "To authentify with the `Batch Processing API`, we will need an access token. We configure the token with the crendetials we used in the `SHConfig` class in the cell above.\n",
"\n",
- "In the following cell, we will set up the authentication parameters for the Sentinel Hub services. Using the credentials specified in the `config_file.py` file, the code fetches an access token. Tokens do not last forever and run out after a while. If you get a message of type ` accessToken signature expired`, just re-run the next cell. See more [information here](https://docs.sentinel-hub.com/api/latest/api/overview/authentication/)"
+ "Tokens do not last forever and run out after a while. If you get a message of type ` accessToken signature expired`, just re-run the next cell. See more [information here](https://docs.sentinel-hub.com/api/latest/api/overview/authentication/)"
]
},
{
],
"metadata": {
"kernelspec": {
- "display_name": "EOLearn",
+ "display_name": "Python 3",
"language": "python",
- "name": "eolearn"
+ "name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.7.6"
+ "version": "3.8.5"
}
},
"nbformat": 4,
