This release is a pre-release and may not be stable for production use.
====================
This is a fork from https://github.com/bendavis78/python-harvest which is a fork of https://github.com/lionheart/python-harvest, but adapted to use Oauth2.
The changes are fairly significant, hence the different version and development status classifier.
Pull requests and issues are welcome!
---------------------
Improving the unit tests is currently the main priority, but any help is welcome.
The tasks are managed by a public Taiga project you can access `here <https://tree.taiga.io/project/j4keh4rding-python-harvest-oauth/>`_.
Usage
=====
This package builds the URL and redirect needed for Harvest authentication, and
provides methods for initial retrieval and refresh of Oauth2 tokens. The Harvest
domain, client id and redirect URL are needed for instantiation like so::
HARVEST_DOMAIN = 'Harvest domain that access is needed'
HARVEST_CLIENT_ID = 'Harvest client id you get after creating Oauth2 app in Harvest.'
HARVEST_CLIENT_SECRET = 'Harvest client secret you get after creating Oauth2 app in Harvest.'
REDIRECT = 'Redirect URL for to redirect to after successful authentication.'
harvest_client = HarvestRestClient(
HARVEST_DOMAIN,
client_id=HARVEST_CLIENT_ID,
redirect_uri=REDIRECT
)
After instantiation, harvest_client.authorize_url will have the url needed authenticate with Harvest.
After successful authentication, Harvest will redirect to REDIRECT with a `code` query param.
The value for it is needed to request the access and refresh tokens.
The tokens need to be saved somewhere by your app.::
CODE = 'String submitted in query param'
ACCESS, REFRESH = harvest_client.get_tokens(CODE, HARVEST_CLIENT_SECRET)
Metadata
Release files for python-harvest-oauth 0.0.1a0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| python-harvest-oauth-0.0.1a0.tar.gz | 6.0 kB | Without provenance | Details for python-harvest-oauth-0.0.1a0.tar.gz |
Release files / python-harvest-oauth-0.0.1a0.tar.gz
| Download URL | python-harvest-oauth-0.0.1a0.tar.gz |
|---|---|
| Size | 6.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f8a07e3bc8ee258d312dc1a54f0d48bc9f8282297e38c41d1d55c9d174c32c90
|
|
BLAKE2b-256 checksum How to use checksums |
3c1ec3300c263028624dcc27fecef610512f1cb050802dfe7a88e5211aa39d32
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for python-harvest-oauth 0.0.1a0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.