Code Monkey home page Code Monkey logo

globalforester-api's Introduction

Global Forester API Example Scripts

This repository contains a collection of Python scripts intended as a starting point for developers looking to utilize the Global Forester API using Python and Swagger. These scripts can be used or combined as-is, or serve as inspiration for more complex implementations. To set up and run the scripts, follow the steps below.

See https://api.globalforester.com/swagger for more detailed information about the API.

The examples uses version 3 of the API, which is the recommended version.

Examples for version 2 of the API can be found here. Note that version 2 only supports fetching data. Version 1 of the API has ceased to be and is now history.

Getting Started

1. Clone the repo

git clone https://github.com/peroper/GlobalForester-API.git
cd GlobalForester-API

2. Install Python 3

https://www.python.org

3. Install Python Dependencies

It is recommended to install dependencies in a virtual environment. This will isolate project dependencies from other projects on the same computer. If you want to read more about virtual environments you can do so here: https://docs.python.org/3/library/venv.html

  1. Create a virtual environment

    python3 -m venv venv
  2. Activate the virtual environment

    source venv/bin/activate
  3. Install dependencies

    pip3 install -r requirements.txt

4. Install swagger-codegen 3

Via Homebrew:

brew install swagger-codegen

For other installation methods, see: https://github.com/swagger-api/swagger-codegen/tree/3.0.0

5. Generate the API Client

swagger-codegen generate -i https://api.globalforester.com/swagger/v3/swagger.json -o Swagger -l python

Scripts assume that the API Client is located in a folder called 'Swagger'

6. Run Scripts

  1. Enter your client ID and client secret in utils.py. Contact support if you don't have a client ID and client secret and API access is included in your Global Forester subscription.

  2. Run any desired script with:

    python3 name_of_script.py
  3. To get more information about a script, run:

    python3 name_of_script.py -h

globalforester-api's People

Contributors

maxkvelland2xper avatar larsabrasha avatar claesahren avatar ollesievers avatar shikull avatar

Stargazers

Joakim Andersson avatar  avatar

Watchers

Per Gustås avatar Karin Gyulai avatar Emil Rydkvist avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.