Add LICENSE, AGENTS.md, and richer pyproject.toml metadata#2
Conversation
Make the (eventually-published) PyPI package easier to discover and consume: - LICENSE (MIT) so the published wheel ships with explicit terms. - AGENTS.md is the dedicated agent-facing playbook covering install, the typed client surface, async support, auth, error handling, and rate limits. - pyproject.toml gains an English description, MIT license, an uapis.cn homepage, the OpenAPI spec URL, PyPI-search-friendly keywords, and the standard trove classifiers (Development Status, License, Python versions, Topic, Typing :: Typed). No code changes; build/publish pipeline is unaffected. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 800100bd9c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| # Paid endpoints take a key | ||
| import os | ||
| paid = UapiClient(base_url="https://uapis.cn", api_key=os.environ["UAPI_KEY"]) |
There was a problem hiding this comment.
Use the supported token parameter in auth docs
For paid-endpoint examples, this constructor call will fail because UapiClient.__init__ accepts token, not api_key, and the implementation sends it as Authorization: Bearer ... rather than X-API-Key (uapi/client.py lines 98-99 and 120-125). Agents following this new quick start will get TypeError: unexpected keyword argument 'api_key' before making any request.
Useful? React with 👍 / 👎.
|
|
||
| ```python | ||
| import asyncio | ||
| from uapi import AsyncUapiClient |
There was a problem hiding this comment.
Remove the nonexistent async client example
This async example imports AsyncUapiClient, but the package exports only UapiClient from uapi/__init__.py, and a repo-wide search finds no AsyncUapiClient class. In any environment where an agent copies this section, from uapi import AsyncUapiClient fails immediately with an import error.
Useful? React with 👍 / 👎.
|
|
||
| ## Errors | ||
|
|
||
| Every method raises a typed `UapiError` (subclass of `httpx.HTTPStatusError`) |
There was a problem hiding this comment.
Describe UapiError as the actual exception type
This states that UapiError subclasses httpx.HTTPStatusError, but the implementation defines class UapiError(Exception) in uapi/errors.py. Code generated from this guidance may catch httpx.HTTPStatusError and miss SDK errors entirely on non-2xx responses.
Useful? React with 👍 / 👎.
Summary
Land explicit license terms, an agent-facing playbook, and search-friendly PyPI metadata so the published
uapi-sdk-pythonpackage surfaces well in PyPI search and AI-agent tooling.uapis.cnhomepage, OpenAPI spec URL, keywords (uapi, sdk, python, public-api, openapi, ...), standard trove classifiersNo code changes; build/publish pipeline untouched.
Review & Testing Checklist for Human
python -m buildproduces a wheel + sdist with the new metadata