DEV Community

BHUVANESH M
BHUVANESH M

Posted on

1

Explore Space with Python: Using CosmoTalker Library

A digital illustration blending space and coding themes. The centerpiece is a glowing terminal screen displaying the Python command import cosmotalker. Surrounding it are elements like planets, stars, a SpaceX rocket launching, a satellite, and symbolic icons of NASA APOD, Wikipedia, and the Python logo. A futuristic interface overlay adds a sense of interactivity and data visualization.
If you're fascinated by space and love working with Python, I've developed a lightweight library called cosmotalker that brings real-time space data and offline resources into your projects. This post walks through some of its capabilities and how it can be integrated into your Python environment.

🔭 What is CosmoTalker?

CosmoTalker is a Python library designed to help developers, students, and astronomy enthusiasts interact with:

  • NASA's Astronomy Picture of the Day (APOD)
  • Upcoming launches from SpaceX
  • Satellite tracking data from CelesTrak
  • Offline celestial body information
  • Simple web searches (eco-friendly and educational)
  • Wikipedia summaries on space topics

📦 Installation

You can install CosmoTalker on your machine using pip:

pip install cosmotalker
Enter fullscreen mode Exit fullscreen mode

🧪 Example Usages

Here are a few snippets to help you get started:

import cosmotalker

# Chatbot feature
print(cosmotalker.chat())
import cosmotalker
## 💬 New in v1.6.1: Chatbot
print(cosmotalker.chat())

# Retrieve information about a celestial body
earth_info = cosmotalker.get("earth")
print(earth_info)  # Offline function

# Provide feedback to improve CosmoTalker
print(cosmotalker.feedback())

# Online Features
print(cosmotalker.apod())          # Fetch Astronomy Picture of the Day
print(cosmotalker.celestrak())     # Get satellite tracking data
print(cosmotalker.search("yt"))    # Opens YouTube
print(cosmotalker.search("words")) # Eco-friendly web search
print(cosmotalker.get("yuri"))     # Deep search about Yuri
print(cosmotalker.spacex())        # SpaceX upcoming launches
print(cosmotalker.wiki("black hole"))  # New wiki summary(v1.6)
# Retrieve info about Earth (offline)
earth_info = cosmotalker.get("earth")
print(earth_info)

# Provide feedback
print(cosmotalker.feedback())

# Online features
print(cosmotalker.apod())          # Astronomy Picture of the Day
print(cosmotalker.spacex())        # Upcoming SpaceX launches
print(cosmotalker.celestrak())     # Satellite tracking
print(cosmotalker.get("yuri"))     # Deep search about Yuri Gagarin
print(cosmotalker.wiki("black hole"))  # Wikipedia summary
print(cosmotalker.search("yt"))    # Opens YouTube
print(cosmotalker.search("words")) # Eco-friendly search
Enter fullscreen mode Exit fullscreen mode

🚧 Final Note

This library was built with simplicity and learning in mind. You're welcome to explore it, contribute, or use it as a base for your own space-related Python projects. It's freely available on PyPI and open for improvements.

If you end up using it in your projects or have suggestions, feel free to leave feedback through the built-in feedback() function.

Thanks for reading, and keep exploring the stars!

ACI image

ACI.dev: Best Open-Source Composio Alternative (AI Agent Tooling)

100% open-source tool-use platform (backend, dev portal, integration library, SDK/MCP) that connects your AI agents to 600+ tools with multi-tenant auth, granular permissions, and access through direct function calling or a unified MCP server.

Star our GitHub!

Top comments (0)

Tiger Data image

🐯 🚀 Timescale is now TigerData: Building the Modern PostgreSQL for the Analytical and Agentic Era

We’ve quietly evolved from a time-series database into the modern PostgreSQL for today’s and tomorrow’s computing, built for performance, scale, and the agentic future.

So we’re changing our name: from Timescale to TigerData. Not to change who we are, but to reflect who we’ve become. TigerData is bold, fast, and built to power the next era of software.

Read more

👋 Kindness is contagious

If this **helped, please leave a ❤️ or a friendly comment!

Okay