Registry / auth-security / python-upwork-oauth2

python-upwork-oauth2

JSON →
library3.2.0pypypi✓ verified 84d ago

Python bindings for the Upwork API using OAuth2. Current version 3.2.0, supports Python >=3.8. This library replaces the old OAuth1-based client. Release cadence is irregular.

pip install python-upwork-oauth2
INSTALL
IMPORT
SIG · PYTHON-UPWORK-OAUT
P
python-upwork-oauth2
auth-securitypythonv3.2.0
Install
2.3s avg
Import
—
Disk
21MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v3.2.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 23.2MB
glibc
py 3.10–3.95 runs
installs and imports cleanly · install 2.3s · import 0.000s · 24MB
21MB installed
● package 21MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Client
✓ from upwork import Client
✗ from upwork import UpworkClient

Authenticate using Client Credentials Grant and create an UpworkClient.

import os from upwork import UpworkClient from upwork.oauth2 import ClientCredentialsGrant client_id = os.environ.get('UPWORK_CLIENT_ID', '') client_secret = os.environ.get('UPWORK_CLIENT_SECRET', '') grant = ClientCredentialsGrant( client_id=client_id, client_secret=client_secret ) token = grant.get_token() client = UpworkClient(token=token) # Now use client to call API endpoints print(client.get_user_info())
Debug
Known issues
breakingv3.0.0 dropped OAuth1 support entirely. Import paths changed from upwork_api to upwork.
fix
Replace 'from upwork_api import *' with 'from upwork import UpworkClient' and use OAuth2 grants.
affects: >=3.0.0
breakingv3.2.0 removed calls to the legacy API. Endpoints under /api/* may no longer work.
fix
Use only the current Upwork API endpoints (v2 or later). Review Upwork API changelog.
affects: >=3.2.0
deprecatedAuthorizationCodeGrant is deprecated in favor of ClientCredentialsGrant for machine-to-machine auth.
fix
Switch to ClientCredentialsGrant unless you need user-specific tokens.
affects: >=3.1.0
gotchaToken refresh must be handled manually. The library does not automatically refresh expired tokens.
fix
Check token expiry and call grant.refresh_token() if needed.
affects: all
Upgrade
Version history
3.2.0latest on PyPI · released Nov 26, 2024
Audit
Dependencies
requestsrequiredHTTP client for API calls
pyjwtrequiredJWT token handling for OAuth2 flow
oauthlibrequiredOAuth2 protocol implementation
Agent activity
44 hits · last 30 days
node
39
OpenAI (training)
2
Resources
python-upwork-oauth2 — pip install python-upwork-oauth2 · libregistry