{"id":16704176,"url":"https://github.com/aazuspan/eeauth","last_synced_at":"2025-04-05T04:27:02.470Z","repository":{"id":206780441,"uuid":"716324106","full_name":"aazuspan/eeauth","owner":"aazuspan","description":"An account manager for the Earth Engine Python API","archived":false,"fork":false,"pushed_at":"2023-11-18T20:47:23.000Z","size":33,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-10T17:56:06.925Z","etag":null,"topics":["authentication","cli","earth-engine","earth-engine-python-api","google-earth-engine"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aazuspan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-08T22:36:41.000Z","updated_at":"2023-11-12T08:02:37.000Z","dependencies_parsed_at":"2024-12-18T09:42:50.599Z","dependency_job_id":"0677eac9-01f9-40f9-837a-3f2c5c9b9568","html_url":"https://github.com/aazuspan/eeauth","commit_stats":{"total_commits":12,"total_committers":1,"mean_commits":12.0,"dds":0.0,"last_synced_commit":"7aba1182b78733595f1e411d7966997a081bdfde"},"previous_names":["aazuspan/eeauth"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aazuspan%2Feeauth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aazuspan%2Feeauth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aazuspan%2Feeauth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aazuspan%2Feeauth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aazuspan","download_url":"https://codeload.github.com/aazuspan/eeauth/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247289447,"owners_count":20914463,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["authentication","cli","earth-engine","earth-engine-python-api","google-earth-engine"],"created_at":"2024-10-12T19:11:37.018Z","updated_at":"2025-04-05T04:27:02.447Z","avatar_url":"https://github.com/aazuspan.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faazuspan%2Feeauth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faazuspan%2Feeauth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faazuspan%2Feeauth/lists"}