Skip to content

Add LICENSE, AGENTS.md, and richer pyproject.toml metadata#2

Merged
shuakami merged 1 commit intomainfrom
devin/1778038406-license-agents-pyproject
May 6, 2026
Merged

Add LICENSE, AGENTS.md, and richer pyproject.toml metadata#2
shuakami merged 1 commit intomainfrom
devin/1778038406-license-agents-pyproject

Conversation

@shuakami
Copy link
Copy Markdown
Member

@shuakami shuakami commented May 6, 2026

Summary

Land explicit license terms, an agent-facing playbook, and search-friendly PyPI metadata so the published uapi-sdk-python package surfaces well in PyPI search and AI-agent tooling.

  • LICENSE (MIT)
  • AGENTS.md — install, typed client surface, async support, auth, errors, rate limits, links to sibling repos
  • pyproject.toml — English description, MIT license, uapis.cn homepage, OpenAPI spec URL, keywords (uapi, sdk, python, public-api, openapi, ...), standard trove classifiers

No code changes; build/publish pipeline untouched.

Review & Testing Checklist for Human

  • python -m build produces a wheel + sdist with the new metadata
  • License auto-detected by GitHub
  • PyPI rendering of README + classifiers looks right after the next publish

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>
@shuakami shuakami merged commit 2e61ade into main May 6, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 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".

Comment thread AGENTS.md

# Paid endpoints take a key
import os
paid = UapiClient(base_url="https://uapis.cn", api_key=os.environ["UAPI_KEY"])
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

Comment thread AGENTS.md

```python
import asyncio
from uapi import AsyncUapiClient
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

Comment thread AGENTS.md

## Errors

Every method raises a typed `UapiError` (subclass of `httpx.HTTPStatusError`)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

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.

2 participants