changed the pygithub to httpx #112
Open
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.
๐ Migration: PyGitHub โ httpx GitHub Client
๐ Overview
This project has migrated from using PyGitHub (a Python wrapper for the GitHub REST API) to a fully async
httpx-based GitHub client.The new implementation improves performance, flexibility, and reliability while keeping the same method signatures and naming conventions (
repo_name,file_path_to_change, etc.), ensuring smooth migration.โ Key Changes
httpx.AsyncClientrun_in_executorwrapping)๐ Advantages of httpx over PyGitHub
1. True Async Support
asyncio.run_in_executorasynciodirectly2. Performance
3. Flexibility
4. Robust Error Handling
502,503,504)Retry-Afterheaders respected)5. Reduced Dependencies
httpxand Python stdlib๐ ๏ธ API Usage (Examples)
Create Issue
Create PR with File Changes
Get File Content
๐ฎ Next Steps
๐ Conclusion
By migrating to
httpx, the GitHub client is now faster, async-native, and more resilient.This positions us for better scalability and easier future extensions, while maintaining backward compatibility with the previous PyGitHub-based API.
Fixes: #110