docs: improve README with PyPI install, usage examples, and badges#27
Conversation
|
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. |
There was a problem hiding this comment.
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.
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
c0e9413 to
644a98d
Compare
Remove unused LineItem and Total imports from usage example. Move serialization inside try-except block and add missing Checkout import in validation example.
cusell-google
left a comment
There was a problem hiding this comment.
Thanks @pjordan for the improvements!
|
@pjordan can you please address the comments + the pre-commit failure? we can then merge |
bd0cddc to
8c94082
Compare
|
@damaz91: I think we should be good to go. Can you trigger the security scan workflow? |
|
|
||
| <p align="center"> | ||
| <a href="https://pypi.org/project/ucp-sdk/"><img src="https://img.shields.io/pypi/v/ucp-sdk" alt="PyPI version"></a> | ||
| <a href="https://pypi.org/project/ucp-sdk/"><img src="https://img.shields.io/pypi/pyversions/ucp-sdk" alt="Python versions"></a> |
There was a problem hiding this comment.
what's the difference between PyPi version and Python versions?
There was a problem hiding this comment.
The difference:
- PyPI version badge (shields.io/pypi/v/ucp-sdk) — shows the current released version of the ucp-sdk package itself on PyPI (e.g., v0.2.1). It tells users which version of
your library they'll get when they pip install ucp-sdk. - Python versions badge (shields.io/pypi/pyversions/ucp-sdk) — shows the range of Python interpreter versions the package supports (e.g., 3.9 | 3.10 | 3.11 | 3.12). This
is pulled from the Requires-Python / python_requires classifiers in your package metadata. It tells users which versions of Python the SDK is compatible with.
Summary
pip install ucp-sdk/uv add ucp-sdk)Closes #1
Test plan
🤖 Generated with Claude Code