Prototype for a CLI/Libary designed for interacting with NASA Open APIs with Rust.

Related tags

Command-line voyager
Overview

Contributors Issues MIT License

Overview

Voyager is a swiss army knife library for the NASA Open APIs. It is designed to bundle all the NASA APIs into a single package. Voyager can be used to gather data from a variety of NASA's endpoints, including: Picture of The Day, Solar Flares, Magnetic Storms etc.

Future versions of voyager will strive to incorporate more endpoints, until all of them are integrated.

Crate Usage

Sample progam with voyager_client

Let's see how we can use the voyager_client in our Rust projects.

    use voyager_client::*;

    fn main() {
        keys::set_key("[YOUR_API_KEY]");
        let near_earth_objects = neo().unwrap();
        let magnetic_storms = weather::magnetic().unwrap();
    }

After running the set_key function once, voyager will create a text file at /Users/you/voyager/.api_key.txt that will store your api key. As such, you will only need to run the function once and it will generate errors if you try to run it again. To avoid this, you can read the section below about installing the CLI and configuring the api key through the command line.

Notice we did not use the println! macro to output the responses to our console. Each API query function includes a println! statement as well as a progress bar in the terminal. This can be changed in the future very easily.

CLI Installation

Build binaries

To build the voyager binaries, run:

    cargo build --release

Copying binaries to your local path

    bash install.sh

Setup

Once you have the binaries installed, you must first configure your API key to use with voyager. If you have one already setup through NASA, you can simply run the following command:

    voyager set key [YOUR_API_KEY]

If you don't have an API key yet, you can visit NASA's Open API Documentation to set one up. Then run the command above to link your key with voyager. The key will be written to /Users/you/voyager/.api_key.txt.

    voyager get key

Run this command to ensure voyager has saved your key properly.

CLI Usage

Available commands

    voyager magnetic

This command will retrive data from NASA's magnetic storms API.

    voyager flare

Retrieves solar flare data.

    voyager apod

This command will access NASA's 'A Picture a Day' API endpoint and retrieve data about today's picture from NASA! The output contains the url to the picture, future versions of voyager will support flags that will allow the image to be downloaded to the current directory.

Comments
  • stop enforcing topretty

    stop enforcing topretty

    This merge indicates that to_pretty is no longer being enforced on base clients responses from their query methods. Adds a new struct "Response" which holds implementations for manipulating responses, such as a json method to grab the serde_json::Value object representation of the response, bytedump method to get a Vector of bytes representing the response, and a to_pretty method to turn the json into a pretty string.

    enhancement 
    opened by ethgallucci 0
  • v0.3.0 - New crate structure

    v0.3.0 - New crate structure

    New structural crate changes to make maintaining and developing new modules easier and more intuitive.

    All modules moved to their own files, introduces backwards compatibility breaking changes. This is the reasoning for bumping up a whole version to v0.3.0

    documentation enhancement 
    opened by ethgallucci 0
  • Jpl mission design

    Jpl mission design

    This merge brings light support for the JPL Mission Design API along with it's Query mode (default), Accessible mode (MissionDesignAccessible) and its Map mode (MissionDesignMap).

    enhancement 
    opened by ethgallucci 0
  • Key overhaul

    Key overhaul

    This merge overhauls the key management architecture.

    Deprecates the CLI which was previously in charge of storing keys in favor of quicker .env key storage.

    documentation enhancement 
    opened by ethgallucci 0
  • Neo base client needs 0.2.2 upgrades

    Neo base client needs 0.2.2 upgrades

    I noticed the neo base client still holds the start and end fields in its struct rather than in its query params. Will push these changes today and step up the minor version to 0.2.3. Also going to update the CLI to support 0 argument calls and have it display the help command output upon a 0 argument call.

    opened by ethgallucci 0
  • v.0.2.2

    v.0.2.2

    Implemented support for Insight Rover and Coronal Mass Ejection endpoints. Removed start and end dates from structs, implemented them in query function. Unit tests passing, docs updated.

    documentation enhancement 
    opened by ethgallucci 0
  • 0.2.0 release

    0.2.0 release

    This release brings an overhaul to the voyager crate. Improvements include handling each module as its own client with structs and implementations instead of being strict. This allows for more dynamic usage of voyager while making it more modular and composable so others can use it how they wish instead of being pigeon-holed.

    documentation enhancement 
    opened by ethgallucci 0
  • API Key Config

    API Key Config

    API Key config files need to be saved to a relative path. Should be /Users/[username]. Solve this by using the users module to grab the username of the user configuring voyager. Save the API key there so it's easily accessible for voyager to read when making queries.

    bug good first issue 
    opened by ethgallucci 0
Releases(v0.3.0)
  • v0.3.0(Jan 12, 2022)

    This release includes breaking changes to older versions of the voyager_client crate.

    Structural overhaul to make developing new modules and maintaining old ones easier and more intuitive. Moved every module into their own file to keep lib.rs from getting too long. Added one re-export (json prettyfier) for ease of access in other modules. Removed main from the crate and moved all tests into the tests directory in a file called unit_test.rs. Cargo aliases (unit-test, doc-test) still are available for quickly testing the library.

    Source code(tar.gz)
    Source code(zip)
  • v0.2.6(Jan 10, 2022)

    This release adds a new base client for the Tech Transfer API.

    The default collection for the base client is the patent collection. However there's a method implemented for switching to the software collection.

    Source code(tar.gz)
    Source code(zip)
  • v0.2.5(Jan 10, 2022)

    This release deprecates the CLI which was previously in charge of key management. New key store methods for interacting with .env files, which is hassle-free compared to managing keys with a CLI.

    Now voyager_client depends on a .env file in the root directory with a variable called "API_KEY" to make it's queries through its base clients.

    Source code(tar.gz)
    Source code(zip)
  • v0.2.4(Jan 10, 2022)

    This release includes tools to make contributing to this library easier. Includes upgraded docs, upgraded doc-tests, and a new cargo alias for quickly testing docs.

    Simply run cargo doc-test in the root to test the documentations of each module.

    Source code(tar.gz)
    Source code(zip)
  • v0.2.2(Jan 8, 2022)

    This release adds support for the Insight Rover API, and the Coronal Mass Ejection API. As well as removing the start and end fields from each struct, which felt clunky. These fields have instead become parameters in each base client's query functions.

    This release also deprecates all previous re-exports in favor of shipping more lightweight code. Since one may only need a single client from the library, why export them all?

    Source code(tar.gz)
    Source code(zip)
  • v0.2.0(Jan 8, 2022)

    This release allows for more dynamic usage of voyager, without pigeon-holing its users into strict use cases. Allows for composability and modularity of the voyager_client crate, as well as restructuring the CLI to be only focused on key management.

    Source code(tar.gz)
    Source code(zip)
Owner
Ethan Gallucci
engineer
Ethan Gallucci
Rust(1) cli prototype

rust-cli rust(1) CLI prototype API Docs | Releases | Contributing Installation $ cargo add rust-cli Safety This crate uses #![deny(unsafe_code)] to en

Yosh 16 Jan 4, 2022
Solstice Flare - CLI Tool for interacting with Solana

?? WIP: This tool is in active development, and can experience breaking changes. For safety, it currently operates on Devnet by default Flare Flare is

Anthias Labs 4 Feb 26, 2024
Js-macros - Quickly prototype Rust procedural macros using JavaScript or TypeScript!

js-macros Quickly prototype Rust procedural macros using JavaScript or TypeScript! Have you ever thought "this would be a great use case for a procedu

null 15 Jun 17, 2022
Prototype of the `std::io::ensure!` family of macros

io-ensure Prototype of the `std::io::ensure` family of macros API Docs | Releases | Contributing Installation $ cargo add io-ensure Safety This crate

Yosh 4 Feb 27, 2023
Rust crate for interacting with the Windows Packet Filter driver.

NDISAPI-RS NDISAPI-RS is a Rust crate for interacting with the Windows Packet Filter driver. It provides an easy-to-use, safe, and efficient interface

Vadim Smirnov 6 Jun 15, 2023
An expressive Rust library for interacting with a cache.

Amnesia An expressive Rust library for interacting with a Cache. Features Driver-Based Architecture: Easily switch between different caching strategie

Miguel Piedrafita 25 Dec 28, 2023
A command-line interface for interacting with the ChatGPT API from OpenAI

cligpt cligpt is a command-line interface for interacting with the ChatGPT API from OpenAI. With cligpt, you can quickly and easily generate text by s

Felipe S. S. Schneider 6 Apr 4, 2023
A fast, simple TUI for interacting with systemd services and their logs

systemctl-tui A fast, simple TUI for interacting with systemd services and their logs. systemctl-tui can quickly browse service status and logs, and s

Reilly Wood 11 Sep 1, 2023
A high-level, ergonomic crate for interacting with the UploadThing API

utapi-rs A high-level, ergonomic Rust crate for interacting with the Uploadthing API. Why? If you're using Rust and want to use Uploadthing for file u

Ivan Leon 4 Feb 2, 2024
H2O Open Source Kubernetes operator and a command-line tool to ease deployment (and undeployment) of H2O open-source machine learning platform H2O-3 to Kubernetes.

H2O Kubernetes Repository with official tools to aid the deployment of H2O Machine Learning platform to Kubernetes. There are two essential tools to b

H2O.ai 16 Nov 12, 2022
Cornucopia is a small CLI utility resting on tokio-postgres and designed to facilitate PostgreSQL workflows in Rust

Cornucopia Generate type checked Rust from your SQL Install | Example Cornucopia is a small CLI utility resting on tokio-postgres and designed to faci

Louis Gariépy 1 Dec 20, 2022
Rust-powered CLI tool designed to simplify and streamline the release process with help of ChatGPT

$ releasecraftsman ????‍♂️?? Automate Your Release Process with Precision and Ease. ?? Features Generate well-crafted release notes using GPT-3.5 and

Tornike Gomareli 7 Sep 21, 2023
KAIVM is a multiplatform Command Line Interface (CLI) designed to simplify the process of downloading, managing, configuring, and running different versions of Shinkai Node

KAIVM - Shinkai Version Manager KAIVM is a multiplatform Command Line Interface (CLI) designed to simplify the process of downloading, managing, confi

Alfredo Gallardo 7 May 1, 2024
Fork of the Official Python3 API connector for Bybit's HTTP (bybit) and WebSockets APIs to rust

Fork of pybit python libary in Rust For the rust lovers and creators for bybit exchange version 5 Official Python3 API connector for Bybit's HTTP and

Omambia Dauglous 4 Aug 29, 2023
REC2 (Rusty External Command and Control) is client and server tool allowing auditor to execute command from VirusTotal and Mastodon APIs written in Rust. 🦀

Information: REC2 is an old personal project (early 2023) that I didn't continue development on. It's part of a list of projects that helped me to lea

Quentin Texier (g0h4n) 104 Oct 7, 2023
Rust library for integrating local LLMs (with llama.cpp) and external LLM APIs.

Table of Contents About The Project Getting Started Roadmap Contributing License Contact A rust interface for the OpenAI API and Llama.cpp ./server AP

Shelby Jenkins 4 Dec 18, 2023
A safe and idiomatic wrapper over shared memory APIs in rust with proper cleanups.

shmem-bind A safe and idiomatic wrapper over shared memory APIs in rust with proper cleanups. Quick start: check the message-passing example for bette

ArshiA Akhavan 3 Apr 6, 2024
Crates.io library that provides high-level APIs for obtaining information on various entertainment media such as books, movies, comic books, anime, manga, and so on.

Crates.io library that provides high-level APIs for obtaining information on various entertainment media such as books, movies, comic books, anime, manga, and so on.

consumet-rs 5 Aug 13, 2023
excss is a small, simple, zero-runtime CSS-in-JS library with just two APIs.

excss excss is a small, simple, zero-runtime CSS-in-JS library with just two APIs.

Taishi Naritomi 12 Sep 12, 2023