Skip to main content

Earthscale SDK

Project description

Earthscale

This is a monorepo for Earthscale. It includes the following packages:

  • earthscale-core: Core functionality for connecting to the Earthscale backend
  • tiler: A package for a tile server that serves raster data to the frontend.
  • vector_backend: A package for a backend that preprocesses vector data for the frontend.
  • frontend: A frontend for visualizing geospatial data.
  • earthscale: an SDK and CLI for interacting with Earthscale.

Read the documentation for more information.

Installation

The project requires Python 3.10 and poetry>=1.8 to be installed. Please checkout poetry's installation guide for more information. We recommend creating a conda environment for the project:

conda create -n earthscale python=3.10
conda activate earthscale

First, clone the repository via

git clone https://github.com/earthscale/earthscale.git

Then, navigate to the project directory:

cd earthscale

To initialize the project, run:

make setup

Remote usage

To use the Earthscale SDK, first authenticate with the Earthscale backend in your terminal by running:

earthscale authenticate

Follow the Google OAuth flow to authenticate with the Earthscale backend.

You can access the frontend at https://app.earthscale.ai. You may need to log in with the same Google account you used to authenticate with the Earthscale backend.

Local development

Database setup

First, log into the Earthscale supabase project via the supabase CLI

supabase login
supabase link --project-ref mvkmibwhbplfmurjawlk

It may initially ask for the database password, which can be found in our secret manager here.

Then, start a local supabase instance and seed it with the necessary data:

supabase start
make recreate-local-database

Set the development environment variables

With the supabase instance running, you can set the necessary environment variables for local development:

make dev-env

This creates a local .env file with the necessary environment variables.

Running the frontend

To run the frontend, in one shell, run

make start-frontend

This will launch the frontend at http://localhost:5173. By default, you can log in with a seeded fake user with the following credentials:

  • email: user1@example.com
  • password: password123

Running the tiler with a local database

To run the tiler with the local database, first edit the credentials file ~/.earthscale/credentials.json to :

{
    "email": "user1@example.com",
    "password": "password123",
    "supabase_url": "http://localhost:54321",
    "supabase_anon_key": <anon_key_here>
}

The anon key can be found in .env as EARTHSCALE_SUPABASE_ANON_KEY.

In another shell with an active python environment, run

make start-backend

This will start the tiler at http://localhost:8080.

Starting a docs server

To start a local docs server, run

make start-docs-server

This will start a local docs server at http://localhost:8000. It will automatically rebuild the docs when changes are made.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

earthscale-0.2.1.tar.gz (33.3 kB view details)

Uploaded Source

Built Distribution

earthscale-0.2.1-py3-none-any.whl (39.1 kB view details)

Uploaded Python 3

File details

Details for the file earthscale-0.2.1.tar.gz.

File metadata

  • Download URL: earthscale-0.2.1.tar.gz
  • Upload date:
  • Size: 33.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for earthscale-0.2.1.tar.gz
Algorithm Hash digest
SHA256 3760658974aeffce88b465476e17aff8f17d5ed66ce3b0396c247d1745d7a78f
MD5 f63be4c0dc15ea9c303554ebb25a7f1f
BLAKE2b-256 08e499e7c0d45a156613285b372ee0794b86c5f7e54323fe5f6959eaa7a9c9d1

See more details on using hashes here.

File details

Details for the file earthscale-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: earthscale-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 39.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for earthscale-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c11c5213582e358680592f4ee7e51b7c8b1fd7e14909e86664d3409803539909
MD5 664c15a09784c5be4539a176ad26beea
BLAKE2b-256 0cf1a7933d280b0a26765214dcd060cd6080237f38942d79bab3a7f7e64d9948

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page