Skip to content

joseph-levine-fjorge/python-harvest

 
 

Repository files navigation

Python Harvest API Client

Version License Versions Tests

Installation

Python 3 and above:

pip install "python-harvest-redux>=3.0"

For Python 2 or below:

pip install "python-harvest-redux==2.0.2"

Usage

import harvest
client = harvest.Harvest("https://COMPANYNAME.harvestapp.com", "EMAIL", "PASSWORD")
client.who_am_i

How to use OAuth2

Token must look like this:

token = {
  'token_type': 'bearer',
  'access_token': 'your access token',
  'refresh_token': 'your refresh token',
  'expires_in': 64799,
}

For information on how to get initial tokens see: https://github.com/harvesthq/api/blob/master/Authentication/OAuth%202.0.md

import harvest
client = harvest.Harvest("https://COMPANYNAME.harvestapp.com", client_id=client_id, token=token)
client.who_am_i

Contributions

Contributions are welcome. Please submit a pull request and make sure you adhere to PEP-8 coding guidelines. I'll review your patch and will accept if it looks good.

TODOs

  • Tests
  • Full OAuth workflow
  • More documentation

License

python-harvest is licensed under Apache 2.0. See LICENSE for more details.

Authors

See AUTHORS.

About

A Python wrapper for the Harvest time-tracking API.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 98.3%
  • Shell 1.2%
  • Makefile 0.5%