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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

Details for the file getharvest_api_wrapper-0.1.1.tar.gz.

File metadata

  • Download URL: getharvest_api_wrapper-0.1.1.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.2

File hashes

Hashes for getharvest_api_wrapper-0.1.1.tar.gz
Algorithm Hash digest
SHA256 ef42bce678470e230485fa7791ce5443406e0c89fca846c74382b41eece38314
MD5 7c9e1d194c1885c0350c84bb2f1e6b89
BLAKE2b-256 04e98a04cb68e1ddbb73f34055f32f326ce00a81adb51eb914fd9f59ca217ee7

See more details on using hashes here.

File details

Details for the file getharvest_api_wrapper-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for getharvest_api_wrapper-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a3e903262e23823dc2d5805786fbcb2d5faa493e3e4c16b1071a5a91a8a4be7f
MD5 959a0f1ff633ba91e9f3a7216032d8b4
BLAKE2b-256 d96bcd3bfbe6c8d9f9f4a21a009380fc41ae59b69dbe113e59cd4e6a09dc80e1

See more details on using hashes here.

Supported by

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