Skip to main content

A very basic and incomplete API Wrapper for the getharvest.com API

Project description

Python Harvest API Wrapper

Yet another Python wrapper for the Harvest API project management and time tracker application.

This wrapper has incredibly humble goals, which are to support some specific API calls on some functionality to support a Harvest CLI application.

No Oauth2, authentication is done by passing an API token and a user ID into the constructor. The constructor also requires a user agent to be passed down, as the wrapper is intended to sit as a library within a larger application.

Basic usage

from getharvest_api_wrapper import HarvestAPI

h = HarvestAPI("$USER_AGENT", "$ACCESS_TOKEN", "$ACCOUNT_ID")

# Some basic functionality. Wherever the API specifies you can have query parameters in a GET request, you should pass in a dict of parameters. This can be empty.
# For payloads for the POST and PATCH requests, you should pass in a dict of these parameters as well.

my_project_assignments = h.get_active_project_assignments_for_current_user({}).json()

response = h.update_user_assigned_teammates('$TARGET_USER_ID', {'teammate_ids': [1234, 5678]})

Documentation

For now, view the documentation using pydoc:

python3 -m pydoc getharvest_api_wrapper/harvest_api.py

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

getharvest_api_wrapper-0.1.1.tar.gz (5.8 kB view hashes)

Uploaded Source

Built Distribution

getharvest_api_wrapper-0.1.1-py3-none-any.whl (17.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page