Python 3 and above:
pip install "python-harvest-redux>=3.0"
For Python 2 or below:
pip install "python-harvest-redux==2.0.2"
import harvest
client = harvest.Harvest("https://COMPANYNAME.harvestapp.com", "EMAIL", "PASSWORD")
client.who_am_i
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 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.
- Tests
- Full OAuth workflow
- More documentation
python-harvest is licensed under Apache 2.0. See LICENSE for more details.
See AUTHORS.