Fix: Use basic authentication in AntflyClient - #1
Merged
Conversation
The AntflyClient was incorrectly using a token-based `AuthenticatedClient` for handling username and password credentials. This was causing authentication to fail. This change corrects the client's `__init__` method to use the standard `Client` and pass the username and password as a basic auth tuple via `httpx_args`. This aligns with the API's requirements, which, as defined in `openapi.yaml`, uses HTTP Basic Authentication. The unused `AuthenticatedClient` import has also been removed.
dovinmu
pushed a commit
to dovinmu/antfly-python
that referenced
this pull request
Jan 8, 2026
Bug antflydb#1: Fixed imports from non-existent api_table module - Changed imports to use correct paths: data_operations/batch_write, data_operations/lookup_key, and table_management/ for table ops Bug antflydb#2: Fixed cast() misuse with BatchRequestInserts - cast() only hints types, doesn't convert data - Now properly creates BatchRequestInserts and BatchRequestInsertsAdditionalProperty model instances from dicts Bug antflydb#3: Removed query method referencing non-existent endpoints - query_table and global_query don't exist in generated code - QueryRequest and QueryRequestFullTextSearch models don't exist - Removed the query method until proper endpoints are available
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.
The AntflyClient was incorrectly using a token-based
AuthenticatedClientfor handling username and password credentials. This was causing authentication to fail.This change corrects the client's
__init__method to use the standardClientand pass the username and password as a basic auth tuple viahttpx_args. This aligns with the API's requirements, which, as defined inopenapi.yaml, uses HTTP Basic Authentication.The unused
AuthenticatedClientimport has also been removed.