Chore/type hints and examples - #80
Merged
Merged
Conversation
Contributor
|
👋 Thanks for your contribution, @NEFORCEO! Please make sure:
Maintainers will review it soon. |
Contributor
Merging this PR will improve performance by 38.03%
|
| Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|
| ⚡ | test_response_req_text_from_json |
213.2 µs | 134.7 µs | +58.26% |
| ⚡ | test_response_repr |
196.4 µs | 130.6 µs | +50.41% |
| ⚡ | test_response_property_access |
194.5 µs | 130.3 µs | +49.22% |
| ⚡ | test_response_json_parsing |
205.6 µs | 139.9 µs | +46.94% |
| ⚡ | test_response_creation |
201.3 µs | 138.4 µs | +45.41% |
| ⚡ | test_middleware_after_response |
403.1 µs | 353.2 µs | +14.12% |
| ⚡ | test_response_json_parsing_large_payload |
666.7 µs | 605 µs | +10.2% |
Tip
Curious why this is faster? Comment @codspeedbot explain why this is faster on this PR, or directly use the CodSpeed MCP with your agent.
Comparing chore/type-hints-and-examples (46649ef) with master (6f3d441)1
Footnotes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🚀 Description
OAuth2 examples
Added
examples/oauth2/directory with two examples:client_credentials.py(basic usage) andshared_auth.py(reusing auth across routes).Type hints
OAuth2Scope— new Literal type alias for OAuth2 scope autocompletion in editorsstartup_uuid_version:str→Literal["v4", "v7"]HTTPMethod— reused instead of inline Literal in_add_routeparams/json:dict→dict[str, Any](app.py + session.py)dependencies:list→list[Any](app.py)methodin session.py:str→HTTPMethod(request + stream)headers/req_headers:dict→dict[str, str]query/req_json:dict→dict[str, Any]request_configs(client.py):dict→dict[str, dict[str, Any]]Primutive→Primitive,RequestsOptinal→RequestsOptionalRelease workflow
release.yml: AI-generated release summary for Telegram and email notifications🧩 Type of Change
✅ Checklist
🔗 Related Issues
—
📸 Additional Context
All 559 tests pass.