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.1.5.tar.gz (30.4 kB view details)

Uploaded Source

Built Distribution

earthscale-0.1.5-py3-none-any.whl (35.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for earthscale-0.1.5.tar.gz
Algorithm Hash digest
SHA256 15ad733d7391446caa5bf355313ec54374041a42d002ce0a17761ec06e46276f
MD5 7820d9f8572b3e7ea3c5ad5c6329eaf0
BLAKE2b-256 915760f973d5b80cee0cdb0beeeae2bb3c8cac58ecf315da1230f62accdf450f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: earthscale-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 35.7 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.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 60940df45d828bb35ca5f00d5db1899d29655a6d2d4002ec1d98b874ed0f9504
MD5 39f9604b480d907022348e78703a6551
BLAKE2b-256 0af6f22b523022e5cd62d261864f8ccfe3167b84fbc5bfc3ca9f4980dbc32301

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