Skip to main content

Heliophysics API

Project description

Installation

Command line:

pip install hapiclient

If you are using Anaconda, make sure that the version of pip used is the one distributed with Anaconda (which pip should show a location in an anaconda directory). As a failsafe, on the Python command line, you can use

import os
print(os.popen("pip install hapiclient").read())

Demo

The hapi_demo.py shows example usage of this package. The output of this demo after execution in a Jupyter Notebook can be viewed at hapi_demo.ipynb.

Jypyter Notebook

To execute the demo in a Jupyter Notebook, execute

curl -L -O https://rawgithub.com/hapi-server/client-python/master/hapi_demo.ipynb
jupyter-notebook hapi_demo.ipynb

(A web page should open. To run code in a cell after editng it, enter SHIFT+ENTER.)

Python Command Line

The following Python commands downloads and executes the demo.

Python 2

# D/L and save hapi_demo.py
import urllib
url = 'https://github.com/hapi-server/client-python/raw/master/hapi_demo.py'
urllib.urlretrieve(url,'hapi_demo.py')
exec(open("hapi_demo.py").read(), globals())

Python 3

# D/L and save hapi_demo.py
import urllib.request
url = 'https://github.com/hapi-server/client-python/raw/master/hapi_demo.py'
urllib.request.urlretrieve(url,'hapi_demo.py')
exec(open("hapi_demo.py").read(), globals())

Development

git clone https://github.com/hapi-server/client-python
cd client-python; python setup.py develop

(The command python setup.py develop creates symlinks so that the local package is used instead of an installed package.)

Note that the scripts are written to match syntax/capabilities/interface of the HAPI MATLAB client.

Contact

Submit bug reports and feature requests on the repository issue tracker.

Bob Weigel rweigel@gmu.edu

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hapiclient-0.0.5.tar.gz (14.8 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page