Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Server-side vs Client-side/Local Objects

Server-side

  • stored on GEE’s servers (not on your local machine)

  • any variable created with ee.* is a server-side object

  • can’t be used directly with non-ee.* variables or functions

Client-side or local

  • stored in your local machine

  • regular Python variable

Output
300
<class 'int'>

⚠️ CAUTION

It is usually not recommended to mix client-side (local) and server-side objects and methods.

👨‍💻 TRY IT OUT

Get the sum of the server variables then display it

💡 TIP

  1. When working with server-side objects or variables, you should also use server-side (ee.*) functions.

  2. When in doubt, refer to the GEE API Documentation.

Source
Output
<class 'ee.ee_number.Number'>
300
<class 'int'>
Source
Output
ee.Number({
  "functionInvocationValue": {
    "functionName": "Number.add",
    "arguments": {
      "left": {
        "constantValue": 100
      },
      "right": {
        "constantValue": 200
      }
    }
  }
})
<class 'ee.ee_number.Number'>

🤔 SOMETHING TO THINK ABOUT

Did you notice any differences between the server-side and client/local computation of the sum?