Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
nwunderly committed Nov 21, 2020
1 parent 386816b commit 8874f70
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 8 deletions.
9 changes: 6 additions & 3 deletions docs/apod.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,13 @@ Data Class
.. autoclass:: AstronomyPicture
:members:

Example Script
Example Code
--------------

This is a simple script that will return the title, explanation, and url from the most recent Astronomy Picture of the Day page,
then download and save the image.

.. code:: python
.. code-block:: python
:linenos:
import asyncio
Expand All @@ -53,7 +54,9 @@ then download and save the image.
CLI Example
-----------

This command, like the above python script, will print data returned by the APOD API, then download and save the image.

.. code:: sh
.. code-block:: sh
python3 -m aionasa.apod --print --download .
15 changes: 11 additions & 4 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ Installing
----------

aionasa can be installed from pypi with the command:
.. code:: sh

.. code-block:: sh
# Linux
python3 -m pip install -U aionasa
Expand All @@ -32,7 +34,9 @@ aionasa can be installed from pypi with the command:
To install the development version of the library directly from source:
.. code:: sh

.. code-block:: sh
$ git clone https://github.com/nwunderly/aionasa
$ cd aionasa
$ python3 -m pip install -U .
Expand All @@ -42,11 +46,14 @@ Quickstart
-----------

We'll be using IPython because it supports `await` expressions directly from the console.
.. code:: sh

.. code-block:: sh
$ pip install aionasa ipython
$ ipython
.. code:: python
.. code-block:: python
from aionasa import APOD, InSight
async with APOD() as apod:
Expand Down
3 changes: 2 additions & 1 deletion docs/insight.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ Client

Example Code
------------
.. code:: python

.. code-block:: python
:linenos:
import asyncio
Expand Down

0 comments on commit 8874f70

Please sign in to comment.