Client Libraries¶
The 3forge Enterprise client libraries connect an external program to a deployment without the browser UI, so the program can run SQL, receive live row changes, publish data, and answer commands.
Overview¶
A client program connects to up to 3 listeners on a deployment, one for each kind of work:
- The SQL connection: runs queries and writes tables through the Center's JDBC listener, port 3280 by default.
- The Center connection: subscribes to tables and receives every added, updated, and deleted row, through the Center port, 3270 by default.
- The Relay connection: publishes objects into tables and registers commands, through the Relay port, 3289 by default.
A default install requires a client certificate on all 3 ports. See Connecting and Securing a Client.
Features¶
- Run SQL from your program: queries, inserts, and bulk loads return Python lists and numpy arrays, a pandas DataFrame, or a C++ table.
- Stream live row changes: a live data subscription delivers a table's current rows, then every change as it happens, with only the changed columns on an update.
- Publish data into tables: a program can push data, such as a real-time feed, to a Relay as objects, and each object lands in a table named for its type, which is created if it is new.
- Query without writing SQL: the Python query builder writes the
SELECT, quoting names and values so they cannot change the statement. - Use pandas and SQLAlchemy: a DB-API driver and a SQLAlchemy dialect let
pandas.read_sqlread tables directly. - Connect with mutual TLS (mTLS): each client presents its own certificate, and can pin the server's key.
Which client to use¶
| Client | What it is | Run SQL | Subscribe | Publish and commands |
|---|---|---|---|---|
| Python client | The pyami-3forge package for Python 3.14 |
Yes | Yes | Yes |
| C++ client | A C++20 library built from source, with one header, ami_client.hpp |
Yes | Yes, with server-side filters | Yes |
| Java client | Classes inside the install's lib/amicore.jar |
Yes, with a license file | Yes, with a license file | Yes |
| ODBC driver | A 64-bit Windows driver for Excel and other ODBC tools | Yes | No | No |
The Python client is built on the C++ library, so the two share the same model and method names.
To connect a SQL or business intelligence tool over JDBC, use the JDBC driver, documented in JDBC Access. The Excel add-in has its own section.
Where to start¶
- Quickstart: connect, run a query, and watch a live update, in Python or C++.
- Concepts: clusters, the 3 connections, the callback thread, and what a publish acknowledgement means.
- Connecting and Securing a Client: ports, client certificates, the authorized-clients file, failover, and limits.
- Python client, with the query builder, DB-API and SQLAlchemy, and Python in Jupyter.
- C++ client, Java client, and ODBC driver.
- Use cases: a market data publisher and subscriber, a real-time risk and P&L loop, and quant analytics with pandas.
- Troubleshooting: messages, silent failures, and their fixes.