DEV Community

Cover image for Building Space Apps in the Browser with GalacticCode and CosmoTalker
BHUVANESH M
BHUVANESH M

Posted on

Building Space Apps in the Browser with GalacticCode and CosmoTalker

Most online Python compilers allow basic execution, but they usually do not support installing or using third-party libraries like numpy, pandas, or custom modules.

This limits what users can actually build.

To address this, I created a browser-based Python environment where code runs instantly and libraries can be used without manual installation.

GalacticCode runs Python directly in the browser using WebAssembly (Pyodide). It executes code locally, so there is no backend dependency, no file upload, and no setup required.

CosmoTalker is integrated into this environment, allowing users to access space-related data and build small applications directly.

With this setup:

  • Python runs instantly in the browser
  • CosmoTalker is preloaded
  • No installation or configuration is required
  • Code executes locally

Example:

import cosmotalker

print(cosmotalker.get("mars"))
cosmotalker.apod()
Enter fullscreen mode Exit fullscreen mode

You can run the above example directly here:
https://bhuvanesh-m-dev.github.io/galacticcode/?code=aW1wb3J0IGNvc21vdGFsa2VyIApwcmludChjb3Ntb3RhbGtlci5nZXQoIm1hcnMiKSkgCmNvc21vdGFsa2VyLmFwb2QoKQ==

Another example (multiple planet data):
https://bhuvanesh-m-dev.github.io/galacticcode/?code=aW1wb3J0IGNvc21vdGFsa2VyCnByaW50KGNvc21vdGFsa2VyLmdldCgidmVudXMiKSkKcHJpbnQoY29zbW90YWxrZXIuZ2V0KCJtYXJzIikp


The Astronomy Picture of the Day (APOD) fetched today:

APOD


Demo video:


The objective is to reduce setup friction while still allowing practical experimentation and small-scale application development directly in the browser.

https://bhuvanesh-m-dev.github.io/galacticcode

Top comments (0)