Skip to content

ericturcotte/api-example

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

API Example

Example apps using Climate's API.

Setup

  1. Install python 3.6+.

    # if you use Mac OS X and brew, this can be done with:
    brew install python3
  2. Make a virtual environment, activate it, and install dependencies.

    python3 -m venv api-example
    source api-example/bin/activate
    pip install -r requirements.txt
  3. Set the following environment variables to the values provided by Climate:

    export CLIMATE_API_ID="partner-fooco"
    export CLIMATE_API_SECRET="azbq56fpadhnt8oukoeani2a4w"
    export CLIMATE_API_KEY="partner-fooco-216b9875-0158-4142-1ab2-7c3bdbd6a2157"
    

When you're done testing the example, deactivate the virtual environment with:

bash
deactivate

Running the web example

  1. Follow steps in Setup

  2. Start the server:

    bash
    python3 main.py
    
  3. Open a browser to localhost:8080/home

License

Copyright © 2017 The Climate Corporation

About

Climate API Example

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 100.0%