Skip to content

Chore/type hints and examples - #80

Merged
NEFORCEO merged 15 commits into
masterfrom
chore/type-hints-and-examples
Jun 20, 2026
Merged

Chore/type hints and examples#80
NEFORCEO merged 15 commits into
masterfrom
chore/type-hints-and-examples

Conversation

@NEFORCEO

Copy link
Copy Markdown
Member

🚀 Description

OAuth2 examples

Added examples/oauth2/ directory with two examples: client_credentials.py (basic usage) and shared_auth.py (reusing auth across routes).

Type hints

  • OAuth2Scope — new Literal type alias for OAuth2 scope autocompletion in editors
  • startup_uuid_version: strLiteral["v4", "v7"]
  • HTTPMethod — reused instead of inline Literal in _add_route
  • params/json: dictdict[str, Any] (app.py + session.py)
  • dependencies: listlist[Any] (app.py)
  • method in session.py: strHTTPMethod (request + stream)
  • headers/req_headers: dictdict[str, str]
  • query/req_json: dictdict[str, Any]
  • request_configs (client.py): dictdict[str, dict[str, Any]]
  • Fixed typos: PrimutivePrimitive, RequestsOptinalRequestsOptional

Release workflow

  • release.yml: AI-generated release summary for Telegram and email notifications
  • Email notification redesigned: light theme, "What's New" section with changelog

🧩 Type of Change

  • feat: New feature
  • fix: Bug fix
  • docs: Documentation update
  • refactor: Code refactoring
  • ci: CI/CD changes
  • chore: Maintenance

✅ Checklist

  • Tests added or updated
  • Documentation updated
  • No breaking changes
  • Code follows project style

🔗 Related Issues


📸 Additional Context

All 559 tests pass.

@github-actions

Copy link
Copy Markdown
Contributor

👋 Thanks for your contribution, @NEFORCEO!

Please make sure:

  • Code is clean and formatted
  • Tests are passing
  • PR description is clear

Maintainers will review it soon.

@codspeed-hq

codspeed-hq Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will improve performance by 38.03%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 7 improved benchmarks
✅ 5 untouched benchmarks

Performance Changes

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

Open in CodSpeed

Footnotes

  1. No successful run was found on master (7e0823d) during the generation of this report, so 6f3d441 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@NEFORCEO
NEFORCEO merged commit 8ba9093 into master Jun 20, 2026
17 checks passed
@NEFORCEO
NEFORCEO deleted the chore/type-hints-and-examples branch June 20, 2026 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants