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 details)

Uploaded Source

File details

Details for the file hapiclient-0.0.5.tar.gz.

File metadata

  • Download URL: hapiclient-0.0.5.tar.gz
  • Upload date:
  • Size: 14.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.5

File hashes

Hashes for hapiclient-0.0.5.tar.gz
Algorithm Hash digest
SHA256 fa03c7437bb0b008de9bf3cbfa7a130f64174593884a79fd3c692555d3bbecd3
MD5 d573c3097004e612ac41cf5344054342
BLAKE2b-256 7b01bc024a2b9161f9f5971131c8a73aa364b9a802d0a2bcca88b5a7094724f1

See more details on using hashes here.

Supported by

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