Always looking at the sky.
Skyport¶
Skyport is a CLI for obtaining information from astronomical objects.
So far, the entire CLI is based on NASA's open APIs for getting images and information available.
Documentation: https://skyport.henriquesebastiao.com
Source Code: https://github.com/henriquesebastiao/skyport
How to install the CLI¶
To install the cli, I recommend using pipx:
$ pipx install skyport
---> 100%
installed package <strong>skyport 0.1.0</strong>, installed using Python 3.11
These apps are now globally available
- skyport
done! โจ ๐ โจ
But anyway, this is just a recommendation. You can also install using the manager you prefer. Like pip:
pip install skyport
How to use?¶
APOD¶
Requesting the current day's image¶
You can call APOD (Astronomical Image of the Day) through the command line. Example:
$ skyport apod
<strong>The Upper Michigan Blizzard of <span style="color: cyan">1938</span></strong>
Yes, but can your blizzard do this? In the Upper Peninsula of Michigan's Storm of the Century in 1938, some snow drifts reached the level of utility poles. Nearly a meter of new and unexpected snow fell over two days in a storm that started 86 years ago this week. As snow fell and gale-force winds piled snow to surreal heights, many roads became not only impassable but unplowable; people became stranded, cars, school buses and a train became mired, and even a dangerous fire raged. Two people were killed and some students were forced to spend several consecutive days at school. The featured image was taken by a local resident soon after the storm. Although all of this snow eventually melted, repeated snow storms like this help build lasting glaciers in snowy regions of our planet Earth.
<strong>Image link:</strong> <a href="https://apod.nasa.gov/apod/image/2401/snowpoles_brinkman_960.jpg">https://apod.nasa.gov/apod/image/2401/snowpoles_brinkman_960.jpg</a>
Note
This was the image of the day on the date January 21, 2024. Which was when this part of the documentation was written ๐
Requesting an image from a specific day¶
$ skyport apod -d 2022-01-01
<strong>The Full Moon of <span style="color: cyan">2021</span></strong>
Copyright: Soumyadeep Mukherjee
very Full Moon of 2021 shines in this year-spanning astrophoto project, a composite portrait of the familiar lunar nearside at each brightest lunar phase. Arranged by moonth, the year progresses in stripes beginning at the top. Taken with the same camera and lens the stripes are from Full Moon images all combined at the same pixel scale. The stripes still look mismatched, but they show that the Full Moon's angular size changes throughout the year depending on its distance from Kolkata, India, planet Earth. The calendar month, a full moon name, distance in kilometers, and angular size is indicated for each stripe. Angular size is given in minutes of arc corresponding to 1/60th of a degree. The largest Full Moon is near a perigee or closest approach in May. The smallest is near an apogee, the most distant Full Moon in December. Of course the full moons of May and November also slid into Earth's shadow during 2021's two lunar eclipses.
<strong>Image link:</strong> <a href="https://apod.nasa.gov/apod/image/2201/MoonstripsAnnotatedIG.jpg">https://apod.nasa.gov/apod/image/2201/MoonstripsAnnotatedIG.jpg</a>
More information about the CLI¶
You can get more information as stated below, however it is interesting to read the complete tutorial to learn skyport superpowers .
To discover other options, you can use the --help flag:
$ skyport --help
Usage: skyport [OPTIONS] COMMAND [ARGS]...
Skyport is a CLI for obtaining information from astronomical objects.
โญโ Options โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ --version -v Returns the version of Skyport โ
โ --help Show this message and exit. โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
โญโ Commands โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ apod Astronomy Picture of the Day (APOD) https://apod.nasa.gov/apod/ โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
More information about subcommands¶
You can also get information about subcommands by calling the desired subcommand with the --help flag:
$ skyport apod --help
Usage: skyport apod [OPTIONS]
Astronomy Picture of the Day (APOD) https://apod.nasa.gov/apod/
โญโ Options โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ --date -d TEXT Date to search for the image of the day โ
โ [default: 2024-01-22] โ
โ --save-image -s Download the image โ
โ --remaining -r Tells how many requests remain for the API โ
โ --help Show this message and exit. โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ