= ecmind-blue-client
:description: Python library (>=3.12) for ECMind Blue Server. Three abstraction layers: TCP/RPC protocol, connection pool (SyncPoolClient/AsyncPoolClient), and typed ECM object API.
:keywords: ecmind-blue-client, SyncPoolClient, AsyncPoolClient, ECM, TCP, RPC, Python, enaio
:page-tags: overview

`ecmind-blue-client` is a Python library (Python >= 3.12) that wraps access to an ECMind Blue server using the proprietary TCP/RPC protocol.

The library provides three layers of abstraction:

[horizontal]
RPC layer:: Direct TCP socket access to the server. Serialises job parameters into the proprietary binary protocol.
Pool client:: Recommended connection pools (`SyncPoolClient` / `AsyncPoolClient`) with weighted load balancing across multiple servers.
ECM API:: High-level object-oriented API for folders, registers, documents, and direct database access.

== Available namespaces

After initialisation via the `ECM()` factory, the following namespaces are available:

[cols="1,3"]
|===
|Namespace |Description

|`ecm.dms`
|Object operations: folders, registers, documents — query, insert, update, delete

|`ecm.security`
|User and group management

|`ecm.system`
|Server metadata and object definitions

|`ecm.db`
|Direct SQL access via ADO (`ado.ExecuteSQL`)
|===

== Sync and async

All namespaces are available in both synchronous and asynchronous variants.
Passing a `SyncPoolClient` to `ECM()` returns a synchronous instance;
passing an `AsyncPoolClient` returns the asyncio-based variant.

[tabs]
====
Sync::
+
[source,python]
----
from ecmind_blue_client.ecm import ECM
from ecmind_blue_client.pool import SyncPoolClient

client = SyncPoolClient(servers="<host>:4000:1", username="<username>", password="<password>")
ecm = ECM(client)
----

Async::
+
[source,python]
----
from ecmind_blue_client.ecm import ECM
from ecmind_blue_client.pool import AsyncPoolClient

client = AsyncPoolClient(servers="<host>:4000:1", username="<username>", password="<password>")
ecm = ECM(client)
----
====

== Further reading

* xref:quickstart.adoc[Getting started]
* xref:api/index.adoc[API reference]
