11from  _typeshed  import  Incomplete 
22from  datetime  import  datetime 
3- from  uuid  import  UUID 
43from  httpx  import  AsyncClient , Client , Response , Timeout 
54from  httpx ._client  import  BaseClient 
65from  logfire ._internal .config  import  get_base_url_from_token  as  get_base_url_from_token 
@@ -15,8 +14,10 @@ class QueryExecutionError(RuntimeError):
1514    """Raised when the query execution fails on the server.""" 
1615class  QueryRequestError (RuntimeError ):
1716    """Raised when the query request is invalid.""" 
17+ class  InfoRequestError (RuntimeError ):
18+     """Raised when the request for read token info fails because of unavailable information.""" 
1819
19- class  ReadTokenInfo (TypedDict , total = True ):
20+ class  ReadTokenInfo (TypedDict , total = False ):
2021    """Information about the read token.""" 
2122    organization_name : str 
2223    project_name : str 
@@ -56,7 +57,7 @@ class LogfireQueryClient(_BaseLogfireQueryClient[Client]):
5657    def  __enter__ (self ) ->  Self : ...
5758    def  __exit__ (self , exc_type : type [BaseException ] |  None  =  None , exc_value : BaseException  |  None  =  None , traceback : TracebackType  |  None  =  None ) ->  None : ...
5859    def  info (self ) ->  ReadTokenInfo :
59-        """Get information about the read token.""" 
60+          """Get information about the read token.""" 
6061    def  query_json (self , sql : str , min_timestamp : datetime  |  None  =  None , max_timestamp : datetime  |  None  =  None , limit : int  |  None  =  None ) ->  QueryResults :
6162        """Query Logfire data and return the results as a column-oriented dictionary.""" 
6263    def  query_json_rows (self , sql : str , min_timestamp : datetime  |  None  =  None , max_timestamp : datetime  |  None  =  None , limit : int  |  None  =  None ) ->  RowQueryResults :
@@ -80,7 +81,7 @@ class AsyncLogfireQueryClient(_BaseLogfireQueryClient[AsyncClient]):
8081    async  def  __aenter__ (self ) ->  Self : ...
8182    async  def  __aexit__ (self , exc_type : type [BaseException ] |  None  =  None , exc_value : BaseException  |  None  =  None , traceback : TracebackType  |  None  =  None ) ->  None : ...
8283    async  def  info (self ) ->  ReadTokenInfo :
83-        """Get information about the read token.""" 
84+          """Get information about the read token.""" 
8485    async  def  query_json (self , sql : str , min_timestamp : datetime  |  None  =  None , max_timestamp : datetime  |  None  =  None , limit : int  |  None  =  None ) ->  QueryResults :
8586        """Query Logfire data and return the results as a column-oriented dictionary.""" 
8687    async  def  query_json_rows (self , sql : str , min_timestamp : datetime  |  None  =  None , max_timestamp : datetime  |  None  =  None , limit : int  |  None  =  None ) ->  RowQueryResults :
0 commit comments