Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New ReadMe for pygeostreams #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 51 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,56 @@
This library makes it easier to interact with
# Pygeostreams


Pygeostreams is a library that makes it easier to interact with
[GeoTemporal API v2](https://opensource.ncsa.illinois.edu/bitbucket/projects/GEOD/repos/geo-temporal-api-v2) and
[Clowder](https://opensource.ncsa.illinois.edu/bitbucket/projects/CATS/repos/clowder)
to create sensors, streams and datapoints.
to create sensors, , parameters and datapoints.

## Installation

Use the package manager [pip](https://pip.pypa.io/en/stable/) to install Pygeostreams.

```bash
pip install pygeostreams
```

## Usage

```python
# Import different classes to use different Geostream APIs
from pygeostreams.client import GeostreamsClient
from pygeostreams.datapoints import DatapointsApi
from pygeostreams.sensors import SensorsApi
from pygeostreams.streams import StreamsApi
from pygeostreams.parameters import ParametersAPI

# returns 'words'
foobar.pluralize('word')

# Create a new sensor
sensors_client = SensorsApi(host='https://example.com', username='[email protected]', password='example')
sensor_json = sensors_client.sensor_create_json("Site Name",
longitude = 0.000,
latitude= 0.000,
elevation= 0,
organization_id='Organization ID',
title="Title")


sensor = sensors_client.sensor_post(sensor_json)

# Create a new parameters
client = ParametersAPI(host='https://example.com', username='[email protected]', password='example')
parameter_json = client.parameter_create_json('soil_temperature_100cm', 'Soil Temperature at 100 cm', 'C', categories=[['Soil', 'time']])
```


Example parsers can be found at [Seagrant GLFMSP Parsers](https://opensource.ncsa.illinois.edu/bitbucket/projects/GEOD/repos/seagrant-parsers-py/browse/GLFMSP/glfmsp-2017.py)




To run the test:
## License

python -m pytest
This software is licensed under the [NCSA Open Source license](https://opensource.org/licenses/NCSA), an open source license [based on the MIT/X11 license and the 3-clause BSD license.](https://en.wikipedia.org/wiki/University_of_Illinois/NCSA_Open_Source_License)

Example parsers can be found at [Seagrant GLFMSP Parsers](https://opensource.ncsa.illinois.edu/bitbucket/projects/GEOD/repos/seagrant-parsers-py/browse/GLFMSP/glfmsp-2017.py)