+
    nDj5                        ^ RI Ht ^ RIt^ RIHt ^ RIHt ^ RIHt ^ RI	H
t
Ht ^ RIHt ^ RIHt ^R	IHt ]'       d   ^ R
IHt ^ RIHt R.t ! R R4      tR# )    )annotationsN)PathLike)Path)TYPE_CHECKING)Self
deprecated)_send_warning_or_raise)_ServerInternal)CatalogClient)Sequence)TracebackTypeServerc            
          ] tR t^tRtRRRRRRRRRR/R	 R
 lltR R lt]! R4      R R l4       tR R lt	R R lt
R R ltR R ltR R ltR R ltR R ltR R ltR tR# )!r   a  
A Rerun server instance.

This class allows you to start and manage a Rerun server programmatically.
The server hosts recordings and serves them via HTTP, and provides access to
the catalog through a client connection.
When the object goes out of scope the server is automatically shut down.

The server can be used as a context manager, which will automatically shut down
the server when exiting the context.

Example
-------
```python
import rerun as rr

# Start a server with some datasets
with rr.server.Server(port=9876, datasets={"my_data": ["path/to/data.rrd"]}) as server:
    client = server.client()

    # Use the client to interact with the catalog
    dataset = client.get_dataset("my_data")
```

host0.0.0.0portNdatasetstablesaddrc               0    V ^8  d   QhRRRRRRRRR	RR
R/# )   r   strr   z
int | Noner   zEdict[str, str | PathLike[str] | Sequence[str | PathLike[str]]] | Noner   zdict[str, PathLike[str]] | Noner   returnNone )formats   "P/data/cameron/venvs/s3viz/lib/python3.14/site-packages/rerun_sdk/rerun/server.py__annotate__Server.__annotate__1   sQ     M
 M
 M
 	M

 XM
 0M
 M
 
M
    c                   VR8X  d   VR8w  d   Tp\        R^\        R7       Vfn   \        P                  ! \        P                  \        P                  4      ;_uu_ 4       pVP                  R4       VP                  4       ^,          pRRR4       MTp/ p/ p	VEe   VP                  4        F  w  r\        V\        \        ,          4      '       dQ   \        V4      pVP                  4       '       g   \        RV RV
 R24      h\        VP                  4       4      W&   Kv  V Uu. uF  p\        V4      NK  	  ppV F+  pVP                  4       '       d   K  \        RV RV
 R	24      h	  V Uu. uF  p\        VP                  4       4      NK  	  upW&   K  	  \!        TXTT	T;'       g    / P                  4        U
Uu/ uF  w  rV
\        V4      bK  	  upp
R
7      V n        R#   + '       g   i     ELg; iu upi u upi u upp
i )aJ  
Create a new Rerun server instance and start it.

The server will host recordings and serve them via HTTP. If datasets are provided, they will be loaded and made
available when the server starts.

Parameters
----------
host:
    The IP address to bind the server to.
port:
    The port to bind the server to, or `None` to select a random available port.
datasets:
    Optional dictionary specifying dataset to load in the server at startup. Values in the dictionary may be
    either of:
    - a single path: must be a directory, all the RRDs it contains will be registered
    - a sequence of paths: each path must be a RRD file, which will all be registered
tables:
    Optional dictionary mapping table names to lance file paths which will be loaded and made available when the
    server starts.
addr:
    Deprecated: Renamed to `host`

r   zQThe `addr` parameter is deprecated in Rerun 0.29, and has been renamed to `host`.)depth_to_user_codewarning_typeNzPrefix path 'z' for dataset 'z' must be a directory.zPath 'z' must be a RRD file.)r   r   r   dataset_prefixesr   ) r   )r	   DeprecationWarningsocketAF_INETSOCK_STREAMbindgetsocknameitems
isinstancer   r   r   is_dir
ValueErrorabsoluteis_filer
   	_internal)selfr   r   r   r   r   sresolved_portall_datasetsall_dataset_prefixesnamepathppathss   &$$$$$        r   __init__Server.__init__1   s   D 9!2D"c#$/ <v~~v/A/ABBaw ! 2 CB !M!&nn.
dC(N33:D;;==(=odVSi)jkk14T]]_1E(..23dT!WdE3" yy{{",vaSvMb-c"dd # FK)KU#ajjl*;U)KL& /  )!17=||6J6J6LM6L
D#d)O6LM
5 CBB& 4
 *L Ns   ")G,)H 4"HH
,G=	c                   V ^8  d   QhRR/# r   r   r   r   )r   s   "r   r   r      s     $ $S $r    c                6    V P                   P                  4       # )z7Get the URL of the server to which clients can connect.)r2   urlr3   s   &r   rA   
Server.url   s    ~~!!##r    zRenamed to `url`.c                   V ^8  d   QhRR/# r?   r   )r   s   "r   r   r      s       r    c                	"    V P                  4       # )N)rA   rB   s   &r   addressServer.address   s    xxzr    c                   V ^8  d   QhRR/# r?   r   )r   s   "r   r   r      s     % %c %r    c                6    V P                   P                  4       # )z1Get the host (IP) that we've bound the server to.)r2   r   rB   s   &r   r   Server.host   s    ~~""$$r    c                   V ^8  d   QhRR/# )r   r   r   r   )r   s   "r   r   r      s     ? ? ?r    c                    V P                   P                  4       '       g   \        R4      h\        V P                   P	                  4       RR7      # )a  
Get a CatalogClient connected to this server.

The client can be used to interact with the server's catalog, including
querying datasets and tables.

Note: the `datafusion` package is required to use the client. The client
initialization will fail with an error if the package is not installed.

Returns
-------
CatalogClient
    A client for interacting with the server's catalog.

Raises
------
RuntimeError
    If the server is not running.

z,Cannot create client: server is not running.N)token)r2   
is_runningRuntimeErrorr   rA   rB   s   &r   clientServer.client   s=    * ~~((**MNNT^^//1>>r    c                   V ^8  d   QhRR/# )r   r   boolr   )r   s   "r   r   r      s     
+ 
+D 
+r    c                6    V P                   P                  4       # )zz
Check if the server is currently running.

Returns
-------
bool
    `True` if the server is running, `False` otherwise.

)r2   rN   rB   s   &r   rN   Server.is_running   s     ~~((**r    c                   V ^8  d   QhRR/# )r   r   r   r   )r   s   "r   r   r      s     " "$ "r    c                :    V P                   P                  4        R# )z
Stop the server.

After calling this method, the server will no longer be accessible.

Raises
------
RuntimeError
    If the server is not running.

Nr2   shutdownrB   s   &r   rY   Server.shutdown   s     	!r    c                    V ^8  d   QhRRRR/# r   methodr   r   r   r   )r   s   "r   r   r      s     , ,C ,D ,r    c                <    V P                   P                  V4       R# )zKTesting utility: make the given gRPC method fail with a ``NotFound`` error.N)r2   inject_errorr3   r]   s   &&r   _inject_errorServer._inject_error   s    ##F+r    c                    V ^8  d   QhRRRR/# r\   r   )r   s   "r   r   r      s     4 4C 4D 4r    c                <    V P                   P                  V4       R# )z=Testing utility: stop failing a previously injected endpoint.N)r2   clear_injected_errorr`   s   &&r   _clear_injected_errorServer._clear_injected_error   s    ++F3r    c                   V ^8  d   QhRR/# )r   r   r   r   )r   s   "r   r   r      s      4 r    c                    V # )z9Enter the context manager, returning the server instance.r   rB   s   &r   	__enter__Server.__enter__   s    r    c               (    V ^8  d   QhRRRRRRRR/# )	r   exc_typeztype[BaseException] | None	exc_valuezBaseException | None	tracebackzTracebackType | Noner   r   r   )r   s   "r   r   r      s,     " "2"?S"`t"	"r    c                :    V P                   P                  4        R# )z3Exit the context manager, shutting down the server.NrX   )r3   rm   rn   ro   s   &&&&r   __exit__Server.__exit__   s     	!r    )r2   )__name__
__module____qualname____firstlineno____doc__r<   rA   r   rF   r   rP   rN   rY   ra   rf   rj   rq   __static_attributes__r   r    r   r   r      s    4M
 M
  	M

 [_M
 37M
 M
^$ #$ %%?4
+",4" "r    )
__future__r   r'   osr   pathlibr   typingr   typing_extensionsr   r   rerun.error_utilsr	   rerun_bindingsr
   catalogr   collections.abcr   typesr   __all__r   r   r    r   <module>r      s<    "      . 4 * "(#*z" z"r    