Skip to content

docs: improve README with PyPI install, usage examples, and badges#27

Open
pjordan wants to merge 2 commits intoUniversal-Commerce-Protocol:mainfrom
pjordan:worktree-docs+improve-readme
Open

docs: improve README with PyPI install, usage examples, and badges#27
pjordan wants to merge 2 commits intoUniversal-Commerce-Protocol:mainfrom
pjordan:worktree-docs+improve-readme

Conversation

@pjordan
Copy link
Copy Markdown

@pjordan pjordan commented Apr 16, 2026

Summary

  • Replace clone-based installation with PyPI instructions (pip install ucp-sdk / uv add ucp-sdk)
  • Add usage examples showing model imports, typed field access, and Pydantic validation
  • Add model package reference table for discoverability
  • Add PyPI version, Python versions, and license badges
  • Move clone/setup instructions to Development section where they belong

Closes #1

Test plan

  • Badges render correctly on GitHub
  • PyPI links resolve to https://pypi.org/project/ucp-sdk/
  • Code examples match actual model field names (verified against generated models)
  • All existing sections (Contributing, License, Generating Models) preserved unchanged

🤖 Generated with Claude Code

@pjordan pjordan requested review from a team as code owners April 16, 2026 16:28
@google-cla
Copy link
Copy Markdown

google-cla bot commented Apr 16, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request enhances the README.md by adding project badges, updating installation instructions for PyPI and uv, and providing detailed usage and validation examples using Pydantic models. Review feedback suggests streamlining the usage example by removing unused imports and improving the validation example's robustness by moving serialization inside the try-except block to prevent potential NameErrors.

Comment thread README.md Outdated
Comment thread README.md Outdated
Replace clone-based installation with PyPI instructions (pip/uv),
add usage examples showing model imports and validation, add a
model package reference table, and add PyPI/license badges.

Closes Universal-Commerce-Protocol#1
@pjordan pjordan force-pushed the worktree-docs+improve-readme branch from c0e9413 to 644a98d Compare April 16, 2026 16:32
@cusell-google cusell-google self-assigned this Apr 16, 2026
Remove unused LineItem and Total imports from usage example.
Move serialization inside try-except block and add missing
Checkout import in validation example.
@ptiper ptiper requested review from cusell-google and removed request for MitkoDeyanovMitev, archrao, kmcduffie and ptiper April 17, 2026 13:47
Comment thread README.md
## Usage

The SDK provides typed [Pydantic v2](https://docs.pydantic.dev/) models for all
UCP schemas. Import models from `ucp_sdk.models.schemas`:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is already mentioned in 34:35. Is it also needed here?

Comment thread README.md
## Installation

For now, you can install the SDK using the following commands:
Install from PyPI:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Could you clarify this is installation on another project? For example: "To use this SDK in your own project, install it from PyPI:"

[...]

Or, if you are managing your project with uv:
[...]

Copy link
Copy Markdown
Collaborator

@cusell-google cusell-google left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @pjordan for the improvements!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants