Startup¶
Launch arkouda server¶
Follow the Installation instructions to build the arkouda server program. In a terminal, launch it with
arkouda_server -nl <numLocales>
Choose a number of locales that is right for your system and data. The -h flag gives a detailed usage with additional command-line options added by Chapel.
The last line of output from the arkouda_server command should look like
server listening on tcp://node01:5555
Use this hostname and port in the next step to connect to the server.
Connect a Python 3 client¶
In Python 3, connect to the arkouda server using the hostname and port shown by the server program (example values shown here)
>>> import arkouda as ak
>>> ak.connect(connect_url='tcp://node01:5555')
...
connected to node01:5555
If the output does not say “connected”, then something went wrong (even if the command executes). Check that the hostname and port match what the server printed, and that the hostname is reachable from the machine on which the client is running (e.g. not “localhost” for a remote server)
- arkouda.connect(server='localhost', port=5555, timeout=0, access_token=None, connect_url=None, access_channel=None)[source]¶
Connect to a running Arkouda server.
- Parameters:
server (str, default "localhost") – Hostname visible to the current machine.
port (int, default 5555) – Server port.
timeout (int, default 0) – Timeout in seconds for send/receive. If positive, also activates heartbeat monitoring (ZMQ).
access_token (str, optional) – Access token for authenticated servers.
connect_url (str, optional) – Complete URL in the form
tcp://server:port?token=<token_value>.access_channel (Channel, optional) – A pre-constructed channel instance to use instead of the default.
- Raises:
ConnectionError – If there is an error connecting to the server.
ValueError – If connect_url cannot be parsed.
RuntimeError – If a server-side error occurs during connect.
- Return type:
None
Notes
On success, prints the connected address (as seen by the server). If called with an existing connection, the socket will be re-initialized.