Skip to main content

Heliophysics API

Project description

Installation

Standard Method

Operating system command line:

pip install hapiclient

See the Appendix for a fail-safe installation method.

Documentation

All of the features are extensively demonstrated in the hapi_demo.ipynb Jupyter Notebook. The notebook shows example usage of the functions in this package that can be copied into a script or onto a Python command line.

The output of the non-executable version of the notebook can be viewed

To view and execute this notebook locally, enter the following on the command line.

pip install hapiclient # Install hapiclient package
curl -L -O https://rawgithub.com/hapi-server/client-python/master/hapi_demo.ipynb
jupyter-notebook hapi_demo.ipynb # Launches browser window

To view the help string on the Python command line after installing hapiclient using pip install hapiclient, use

from hapiclient import hapi
help(hapi)

or

from hapiclient import hapiplot
help(hapiplot)

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. Use pip uninstall hapiclient to ensure the local package is used.)

To run tests before a commit, execute

make repository-test

To run an individual unit test in a Python session, use, e.g.,

from hapiclient.test.test_hapi import test_reader
test_reader()

Contact

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

Bob Weigel rweigel@gmu.edu

Appendix

Fail-safe installation

Python command line:

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

The above executes and displays the output of the operating system command pip install hapiclient using the shell environment associated with that installation of Python.

This method addresses a problem that is sometimes encountered when attempting to use pip packages in Anaconda. To use a pip package in Anaconda, one must use the version of pip installed with Anaconda (it is usually under a subdirectory with the name anaconda/) as opposed to the one installed with the operating system. To see the location of pip used in a given Python session, enter print(os.popen("which pip").read()).

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.8.tar.gz (41.6 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: hapiclient-0.0.8.tar.gz
  • Upload date:
  • Size: 41.6 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.8.tar.gz
Algorithm Hash digest
SHA256 0f07016bb984e0f31b0e6ef5a7ef190c88519c059b488d7c31dd827e5decbbdf
MD5 bf3776adc7db446f602ec6f8c9dcbcc5
BLAKE2b-256 e58f666d88544da4830c7cad2aa7d567baf47d24250ba8cca9961a47b75f44d4

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