Skip to content

Harden request handling and PyPI README#32

Merged
Skhendle merged 2 commits into
mainfrom
codex/create-development-plan-for-multi-language-clients
Jan 30, 2026
Merged

Harden request handling and PyPI README#32
Skhendle merged 2 commits into
mainfrom
codex/create-development-plan-for-multi-language-clients

Conversation

@Skhendle
Copy link
Copy Markdown
Contributor

Motivation

  • Make HTTP request handling more robust by handling non-JSON success responses and empty bodies gracefully.
  • Standardize Authorization header casing to match common servers (Bearer) and avoid subtle auth bugs.
  • Prefer explicit query parameter usage and ensure request models are serialized before sending JSON to avoid malformed requests.
  • Improve README to be PyPI-friendly and provide stable links to demo and guidance docs.

Description

  • Update BaseClient (src/userverse_python_client/http_client_base.py) to set Authorization: Bearer <token>, return None for empty bodies, and fall back to resp.text when resp.json() fails.
  • Serialize request models by calling model_dump(exclude_none=True) in UverseUserClient (src/userverse_python_client/clients/user.py) for create_user and update_user, and use params for verify_user and password-reset endpoints.
  • Replace manual query-string construction in UverseCompanyClient (src/userverse_python_client/clients/company.py) with explicit params handling and call _request("GET", "/company", params=...).
  • Update docs: make README.md PyPI-friendly with python -m pip install ... and stable repo links, and refresh docs/other-language-clients.md to reflect Bearer casing, non-JSON success fallback, and preferring explicit query parameter handling.

Testing

  • No automated tests were run for these changes.

Codex Task

@Skhendle Skhendle merged commit 06c8cb6 into main Jan 30, 2026
@Skhendle Skhendle added the enhancement New feature or request label Jan 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

codex enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant