Name | eeauth JSON |
Version |
0.1.2
JSON |
| download |
home_page | None |
Summary | An Earth Engine account manager. |
upload_time | 2023-11-18 20:47:00 |
maintainer | None |
docs_url | None |
author | Aaron Zuspan |
requires_python | >=3.9 |
license | MIT License
Copyright (c) 2023 Aaron Zuspan
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. |
keywords |
earthengine
gee
jupyter
notebook
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# eeauth
[![Earth Engine Python](https://img.shields.io/badge/Earth%20Engine%20API-Python-green)](https://developers.google.com/earth-engine/tutorials/community/intro-to-python-api)
[![PyPI version](https://badge.fury.io/py/eeauth.svg)](https://badge.fury.io/py/eeauth)
[![Build status](https://github.com/aazuspan/eeauth/actions/workflows/ci.yaml/badge.svg)](https://github.com/aazuspan/eeauth/actions/workflows/ci.yaml)
An account manager for the Earth Engine Python API that lets you easily authenticate and switch between multiple Google accounts.
## Installation
### From PyPI
```bash
pip install eeauth
```
### From conda-forge
*Coming soon!*
## Usage
### Authenticate
Import `eeauth`, then authenticate a user by running `eeauth.authenticate("username")` and following the usual authentication instructions[^authenticate], being sure to select the correct Google account[^username]. The credentials for each authenticated user are stored by `eeauth` for later use.
```python
import ee
import eeauth
# Authenticate and register credentials for multiple accounts
eeauth.authenticate("personal")
eeauth.authenticate("work")
```
### Initialize
With two users authenticated, you can now initialize Earth Engine with a specific user and switch between them at will.
```python
# Get tasks from your "personal" account
eeauth.initialize("personal")
ee.data.getTaskList()
# And from your "work" account
eeauth.initialize("work")
ee.data.getTaskList()
```
### CLI
The `eeauth` command line interface lets you manage your authenticated users from the terminal.
```bash
Usage: eeauth [OPTIONS] COMMAND [ARGS]...
Manage Earth Engine authentication.
Options:
--version Show the version and exit.
--help Show this message and exit.
Commands:
activate Set USER as the default Earth Engine user.
authenticate Authenticate USER and store their credentials.
list List all authenticated users.
remove Remove USER from the registry.
```
## FAQ
### How does it work?
When you run `ee.Authenticate()`, Earth Engine stores a single credential file on your local machine. To initialize with a different account, you typically need to repeat the authentication process, replacing your old credentials with new credentials. `eeauth` allows you to store multiple credentials tied to unique usernames, so that you can quickly switch between authenticated users without the hassle of re-authenticating every time.
### Can I still use `ee.Initialize()`?
Earth Engine will continue to store the most recently authenticated credentials, so `ee.Initialize()` will work like it always has. You can also run `eeauth activate [USER]` in a terminal to change which user gets initialized by default.
### Is it safe?
Like Earth Engine, `eeauth` stores your credentials in an unencrypted local file[^registry]. As long as you don't share that file, you should be good to go.
[^authenticate]: `eeauth.authenticate` calls `ee.Authenticate` under the hood and accepts the same arguments. The only difference is that `eeauth.authenticate` stores your credentials with your requested username.
[^registry]: Credentials are stored in `~/.config/eeauth/registry.json`.
[^username]: Usernames do not need to match the name of your Google account.
Raw data
{
"_id": null,
"home_page": null,
"name": "eeauth",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "earthengine,gee,jupyter,notebook",
"author": "Aaron Zuspan",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/07/a6/277c1aff85d92f4b5743191d18da2a53b44ff9495c58a932e18157c3777d/eeauth-0.1.2.tar.gz",
"platform": null,
"description": "# eeauth\n\n[![Earth Engine Python](https://img.shields.io/badge/Earth%20Engine%20API-Python-green)](https://developers.google.com/earth-engine/tutorials/community/intro-to-python-api)\n[![PyPI version](https://badge.fury.io/py/eeauth.svg)](https://badge.fury.io/py/eeauth)\n[![Build status](https://github.com/aazuspan/eeauth/actions/workflows/ci.yaml/badge.svg)](https://github.com/aazuspan/eeauth/actions/workflows/ci.yaml)\n\n\nAn account manager for the Earth Engine Python API that lets you easily authenticate and switch between multiple Google accounts.\n\n## Installation\n\n### From PyPI\n\n```bash\npip install eeauth\n```\n\n### From conda-forge\n\n*Coming soon!*\n\n## Usage\n\n### Authenticate\n\nImport `eeauth`, then authenticate a user by running `eeauth.authenticate(\"username\")` and following the usual authentication instructions[^authenticate], being sure to select the correct Google account[^username]. The credentials for each authenticated user are stored by `eeauth` for later use.\n\n```python\nimport ee\nimport eeauth\n\n# Authenticate and register credentials for multiple accounts\neeauth.authenticate(\"personal\")\neeauth.authenticate(\"work\")\n```\n\n### Initialize\n\nWith two users authenticated, you can now initialize Earth Engine with a specific user and switch between them at will.\n\n```python\n# Get tasks from your \"personal\" account\neeauth.initialize(\"personal\")\nee.data.getTaskList()\n\n# And from your \"work\" account\neeauth.initialize(\"work\")\nee.data.getTaskList()\n```\n\n### CLI\n\nThe `eeauth` command line interface lets you manage your authenticated users from the terminal.\n\n```bash\nUsage: eeauth [OPTIONS] COMMAND [ARGS]...\n\n Manage Earth Engine authentication.\n\nOptions:\n --version Show the version and exit.\n --help Show this message and exit.\n\nCommands:\n activate Set USER as the default Earth Engine user.\n authenticate Authenticate USER and store their credentials.\n list List all authenticated users.\n remove Remove USER from the registry.\n```\n\n\n## FAQ\n\n### How does it work?\n\nWhen you run `ee.Authenticate()`, Earth Engine stores a single credential file on your local machine. To initialize with a different account, you typically need to repeat the authentication process, replacing your old credentials with new credentials. `eeauth` allows you to store multiple credentials tied to unique usernames, so that you can quickly switch between authenticated users without the hassle of re-authenticating every time.\n\n### Can I still use `ee.Initialize()`?\n\nEarth Engine will continue to store the most recently authenticated credentials, so `ee.Initialize()` will work like it always has. You can also run `eeauth activate [USER]` in a terminal to change which user gets initialized by default.\n\n### Is it safe?\n\nLike Earth Engine, `eeauth` stores your credentials in an unencrypted local file[^registry]. As long as you don't share that file, you should be good to go.\n\n[^authenticate]: `eeauth.authenticate` calls `ee.Authenticate` under the hood and accepts the same arguments. The only difference is that `eeauth.authenticate` stores your credentials with your requested username.\n[^registry]: Credentials are stored in `~/.config/eeauth/registry.json`.\n[^username]: Usernames do not need to match the name of your Google account.\n",
"bugtrack_url": null,
"license": "MIT License\n \n Copyright (c) 2023 Aaron Zuspan\n \n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n \n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.",
"summary": "An Earth Engine account manager.",
"version": "0.1.2",
"project_urls": {
"Homepage": "https://github.com/aazuspan/eeauth"
},
"split_keywords": [
"earthengine",
"gee",
"jupyter",
"notebook"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "de78bc0821acbb8c6f2a715aee3731c28d1c09cf9a421af898740d382c9b41b7",
"md5": "9a08d54e51c5fa3b696a625af4e9a56a",
"sha256": "c707353b316c0a044ba43bf1b1da4990b4dbd05f924e8c0bc8429818be05580c"
},
"downloads": -1,
"filename": "eeauth-0.1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "9a08d54e51c5fa3b696a625af4e9a56a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 8103,
"upload_time": "2023-11-18T20:47:02",
"upload_time_iso_8601": "2023-11-18T20:47:02.326783Z",
"url": "https://files.pythonhosted.org/packages/de/78/bc0821acbb8c6f2a715aee3731c28d1c09cf9a421af898740d382c9b41b7/eeauth-0.1.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "07a6277c1aff85d92f4b5743191d18da2a53b44ff9495c58a932e18157c3777d",
"md5": "3c8a45449f93c8f4d6bf573de37bfca3",
"sha256": "9b9cd8b7a92b1c47be22e110609d0bdba355c129df5ac91f94a6e9d82c5ae09d"
},
"downloads": -1,
"filename": "eeauth-0.1.2.tar.gz",
"has_sig": false,
"md5_digest": "3c8a45449f93c8f4d6bf573de37bfca3",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 5804,
"upload_time": "2023-11-18T20:47:00",
"upload_time_iso_8601": "2023-11-18T20:47:00.495698Z",
"url": "https://files.pythonhosted.org/packages/07/a6/277c1aff85d92f4b5743191d18da2a53b44ff9495c58a932e18157c3777d/eeauth-0.1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-11-18 20:47:00",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "aazuspan",
"github_project": "eeauth",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "eeauth"
}