Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
extends the capabilities of the earthengine-api by providing custom session management and client interactions
This repository starts as a an alternative for the current calls to Earth Engine API of earthengine-api <https://github.com/google/earthengine-api>
_.
The main issue with the current client api doest not allow multi-user sessions since it uses a global session object. This repository aims to present a workaround for this issue but only in very specific cases:
getMapId
getInfo
ee-client is a Python package designed to extend the capabilities of the Google Earth Engine (GEE) API by providing custom session management and client interactions. This package allows users to make authenticated requests to the Earth Engine REST API using thread safe credentials, facilitating seamless integration and customization of GEE functionalities.
To install the package, simply use pip:
.. code-block:: bash
pip install ee-client # Not yet developed
Here are a few examples of how to use ee-client in your projects:
Initialization and Authentication +++++++++++++++++++++++++++++++++
.. code-block:: python
from eeclient import Session, get_info, get_asset
# Define your credentials and project ID
credentials = {
"client_id": "your_client_id",
"client_secret": "your_client_secret",
"refresh_token": "your_refresh_token",
}
project = "your_project"
# Create a session object
session = Session(credentials, project)
Making API Calls ++++++++++++++++
.. code-block:: python
import ee
# Initialize the Earth Engine library and authenticate
ee.Initialize()
# Example: Get information about an Earth Engine object
result = get_info(session, ee.Number(5))
print(result)
# Example: Get asset information
asset_info = get_asset(session, "users/your_username/your_asset")
print(asset_info)
Fetching Map Tiles: +++++++++++++++++++
.. code-block:: python
from eeclient import get_map_id, get_map_tile
# Example: Get map ID for an Earth Engine image
image = ee.Image('COPERNICUS/S2/20190726T104031_20190726T104035_T31TGL')
map_id = get_map_id(session, image)
# Example: Get map tile layer
tile_layer = get_map_tile(map_id)
print(tile_layer)
Integration with Existing GEE Objects +++++++++++++++++++++++++++++++++++++
WIP
.. code-block:: python
import ee
import eeclient
# Custom method to get information about an Earth Engine Number object
def custom_get_info(self, session):
return get_info(session, self)
# Extend the Earth Engine Number class with the custom method
ee.Number.custom_get_info = custom_get_info
# Usage
number = ee.Number(5)
result = number.eeclient.get_info(session)
print(result)
We welcome contributions from the community. Please feel free to submit issues and pull requests to help improve this package.
Fork the repository +++++++++++++++++++
Create a new branch (git checkout -b feature-branch). Commit your changes (git commit -am 'Add new feature'). Push to the branch (git push origin feature-branch). Create a new Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
FAQs
extends the capabilities of the earthengine-api by providing custom session management and client interactions
We found that ee-client demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.