-
-
Notifications
You must be signed in to change notification settings - Fork 54
feat: add async support #118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
tharropoulos
wants to merge
32
commits into
typesense:master
Choose a base branch
from
tharropoulos:async
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
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
…upport replace requests library with httpx to enable both synchronous and asynchronous http operations. refactor make_request to support sync and async clients with separate implementation methods. - replace requests with httpx for http client operations - add support for both httpx.client and httpx.asyncclient - split make_request into _make_sync_request and _make_async_request - update type hints with bounds for tparams and tbody - change data parameter to content for httpx compatibility - update error handling to use httpx.decodingerror - update documentation to reflect async support
- replace requests-mock with respx for httpx test mocking - add pytest-asyncio configuration with auto mode - remove types-requests dependency - update charset-normalizer, requests, and urllib3 versions
- replace requests with httpx in api_call class - add async_api_call class with httpx.asyncclient support - migrate tests from requests_mock to respx
- add asyncalias class for async individual alias operations - add asyncaliases class for async alias collection operations - add async tests for alias and aliases functionality - add async fixtures for testing async alias operations - remove future annotations imports from test files
- add async tests for analytics functionality - remove future annotations imports from test files
- add async tests for analytics v1 functionality - add async fixtures for testing async analytics v1 operations - remove future annotations imports from test files
- add AsyncCollection class for async individual collection operations - add AsyncCollections class for async collection collection operations - add async tests for collection and collections functionality - add async fixtures for testing async collection operations - remove future annotations imports from test files
- add AsyncConversationModel class for async individual model operations - add AsyncConversationsModels class for async models collection operations - add async tests for conversation model and models functionality - add async fixtures for testing async conversation model operations
- add AsyncCurationSet class for async individual curation set operations - add AsyncCurationSets class for async curation sets collection operations - add async tests for curation set and sets functionality - add async fixtures for testing async curation set operations - remove future annotations imports from test files
- add AsyncDebug class for async debug information retrieval - add async tests for debug functionality - add async fixtures for testing async debug operations - remove future annotations imports from test files
- add AsyncDocument class for async individual document operations - add AsyncDocuments class for async documents collection operations - add async tests for document and documents functionality - add async fixtures for testing async document operations
- add AsyncKey class for async individual key operations - add AsyncKeys class for async keys collection operations - add async tests for key and keys functionality - add async fixtures for testing async key operations
- add AsyncMetrics class for async metrics retrieval - add async tests for metrics functionality - add async fixtures for testing async metrics operations
- add AsyncMultiSearch class for async multi-search operations - add async tests for multi-search functionality - add async fixtures for testing async multi-search operations
- add AsyncNLSearchModel class for async individual model operations - add AsyncNLSearchModels class for async mod
- add AsyncOperations class for async operations functionality - add async tests for operations functionality - add async fixtures for testing async operations
- add AsyncOverride class for async individual override operations - add AsyncOverrides class for async overrides collection operations - add async tests for override and overrides functionality - add async fixtures for testing async override operations
- add AsyncSynonym class for async individual synonym operations - add AsyncSynonyms class for async synonyms collection operations - add async tests for synonym and synonyms functionality - add async fixtures for testing async synonym operations - remove future annotations imports from test files
- add AsyncSynonymSet class for async individual synonym set operations - add AsyncSynonymSets class for async synonym sets collection operations - add async tests for synonym set and sets functionality - add async fixtures for testing async synonym set operations - remove future annotations imports from test files
- add AsyncStemming class for async stemming dictionary operations - add AsyncStemmingDictionaries class for async dictionaries collection operations - add AsyncStemmingDictionary class for async individual dictionary operations - add async tests for stemming functionality - add async fixtures for testing async stemming operations
- add AsyncStopwords class for async stopwords collection operations - add AsyncStopwordsSet class for async individual stopwords set operations - add async tests for stopwords and stopwords set functionality - add async fixtures for testing async stopwords operations
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.
Change Summary
This PR migrates the Typesense Python client from
requeststohttpxand adds async support across all client components. The library now supports both synchronous and asynchronous operations.Core Changes
requeststohttpxfor sync operationsAsyncApiCallclass for async HTTP operationsRequestHandlerto support both sync (httpx.Client) and async (httpx.AsyncClient) clientsrequests-mockwithrespxfor mocking httpx requestspytest-asynciofor async test supportAsync Client
AsyncClientclass as the main entry point for async operationsType System Improvements
TDocTypeVar covariant inCollectionandCollectionsclasses for better type flexibilityfrom __future__ import annotationsimportsTesting
Dependencies
httpxas core dependencyrespxandpytest-asynciofor testingNotes
async withPR Checklist