Skip to main content Switch to mobile version multids 1.1.0 Async multi-data-source connectors (S3, OpenSearch, Athena, MySQL, SQL Server, local files) with AI hooks.
pip install multids==1.1.0 Copy PIP instructions
Async-first connectors for moving data across S3, OpenSearch, Athena, MySQL, SQL Server, and local files — with a single, consistent API for streaming, bulk I/O, resumable uploads, and AI enrichment.
multids gives you one interface for many backends. Write a pipeline once, then point it at local files for testing and at S3 or a database for production. Every connector supports both async and sync usage, typed errors, automatic retries, and structured telemetry.
Full documentation: https://aljasem-tech.github.io/multids/
Connectors at a glance
Every connector implements the same core operations — read_stream, read_bytes, write_stream, write_bytes, read_json, write_json — plus backend-specific methods like bulk_insert (SQL) and bulk_index (OpenSearch).
pip install multids Install only the backends you need:
pip install 'multids[s3]' # S3 + local files pip install 'multids[opensearch]' # OpenSearch / Elasticsearch pip install 'multids[mysql]' # MySQL (asyncmy + SQLAlchemy) pip install 'multids[postgres]' # PostgreSQL (asyncpg + psycopg2) pip install 'multids[sqlserver]' # SQL Server (aioodbc + pyodbc) pip install 'multids[local]' # Local files (aiofiles) pip install 'multids[ai]' # OpenAI-compatible AI hooks # Or install everything: pip install 'multids[all]' SQL Server note: the sqlserver extra requires an ODBC driver on your system (e.g. ODBC Driver 18 for SQL Server). It is not available on Python 3.12+ because pyodbc does not publish wheels for those versions.
Async: write and read JSON locally
import asyncio from multids.connectors.local import LocalConnector async def main(): local = LocalConnector() data = {"message": "Hello", "lang": "你好"} # Write JSON with unescaped Unicode await local.write_json(data, "path/to/data.json") # Read it back result = await local.read_json("path/to/data.json") print(result) asyncio.run(main()) Async: upload to S3
Prefer synchronous code? Every core connector has a sync twin under multids.connectors.sync:
from multids.connectors.sync.local import SyncLocalConnector from multids.connectors.sync.s3 import SyncS3Connector # Local files local = SyncLocalConnector() local.write_bytes(b"hello", "out.txt") print(local.read_bytes("out.txt")) # S3 s3 = SyncS3Connector(region_name="eu-central-1") s3.write_bytes(b"hello from sync", "my-bucket", "sync.txt") print(s3.read_bytes("my-bucket", "sync.txt")) s3.close() Error handling
All connectors raise stable, typed errors from multids.errors — you never need to import a backend SDK's exception:
import asyncio from multids.errors import ConnectorConnectionError, ConnectorOperationError from multids.connectors.s3 import S3Connector async def main(): s3 = S3Connector() try: await s3.read_bytes("my-bucket", "missing-key") except ConnectorOperationError: print("Backend rejected the request (e.g. 404, invalid input)") except ConnectorConnectionError: print("Backend unreachable after retries — check network/credentials") finally: await s3.close() asyncio.run(main()) Error Meaning ConnectorError Base class for all connector errors ConnectorDependencyError An optional dependency (driver) is not installed ConnectorConnectionError Backend unreachable or timed out after retries (safe to retry) ConnectorOperationError Backend rejected a valid request ConnectorSchemaError Request/result shape is wrong (subclass of ConnectorOperationError) ConnectorDataError A row/document was rejected (subclass of ConnectorOperationError) S3: multipart and resumable uploads
S3Connector automatically switches from a single put_object to a multipart upload when the payload exceeds min_multipart_upload_size (default 5 MiB). You can also force multipart for checkpoint-based resume.
SQL connectors (MySQL, SQL Server)
SQL connectors provide execute, fetch_rows, bulk_insert, and record-streaming helpers. They use SQLAlchemy under the hood and create their engine lazily on first use.
from multids.connectors.sync.sql import SyncMySQLConnector mysql = SyncMySQLConnector("mysql+pymysql://user:pass@localhost:3306/db") mysql.bulk_insert("users", [{"id": 1, "name": "alice"}], chunk_size=100) rows = mysql.fetch_rows("SELECT id, name FROM users") mysql.close() For SQL Server, use MSSQLConnector (async) or SyncMSSQLConnector (sync) with an ODBC connection string:
PostgreSQLConnector uses asyncpg directly and supports native COPY-protocol bulk inserts for high-throughput ingestion:
from multids.connectors.sync.postgres import SyncPostgreSQLConnector pg = SyncPostgreSQLConnector("postgresql://user:pass@localhost:5432/db") pg.bulk_insert("users", [{"id": 1, "name": "alice"}]) rows = list(pg.fetch_rows("SELECT * FROM users WHERE id > %s", (0,))) pg.close() OpenSearch
OpenSearchConnector is an async, httpx-based client for indexing, searching, and scrolling OpenSearch / Elasticsearch.
from multids.connectors.opensearch import OpenSearchConnector # API key oc = OpenSearchConnector("https://es.example.com", api_key="BASE64_API_KEY") # Basic auth oc = OpenSearchConnector("https://es.example.com", basic_auth=("user", "pass")) Synchronous variant:
from multids.connectors.sync.opensearch import SyncOpenSearchConnector oc = SyncOpenSearchConnector("http://localhost:9200") # Index a single document oc.index_doc("my-index", {"name": "alice"}) # Bulk index docs = [{"id": 1, "name": "a"}, {"id": 2, "name": "b"}] oc.bulk_index("my-index", docs, chunk_size=100) # Search result = oc.search("my-index", {"query": {"match_all": {}}}, size=10) # Scroll over large result sets for hit in oc.scroll("my-index", {"query": {"match_all": {}}}): print(hit) oc.close() AI enrichment
multids.ai provides a pluggable text-generation interface that works with any OpenAI-compatible client. Use it to enrich records before indexing them:
import asyncio from openai import AsyncOpenAI from multids.ai import OpenAIClient from multids.connectors.opensearch import OpenSearchConnector async def main(): ai = OpenAIClient(AsyncOpenAI()) oc = OpenSearchConnector("http://localhost:9200") docs = [{"id": "1", "text": "OpenSearch + AI"}] for doc in docs: response = await ai.generate(doc["text"], model="gpt-4o-mini") doc["summary"] = response["content"] await oc.bulk_index("my-index", docs) await oc.close() asyncio.run(main()) Data workflows
multids.workflows connects two connectors without buffering the whole payload in memory:
A built-in CLI handles safe local-file operations:
multids ping --path ./data multids copy ./data/input.jsonl ./out/input.jsonl multids validate workflow.json Documentation
Contributions are welcome. See CONTRIBUTING.md for development setup, testing, and the pull request process.
Released: Dec 5, 2026
Author: Khaldoun Aljasem
ai all local mysql opensearch postgres s3 sqlserver sync
Development Status 4 - Beta
Intended Audience Developers
License OSI Approved :: MIT License
Programming Language Python :: 3
Release files for multids 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
Built distribution (wheel)
Total release size: 144.1 kB
Release files / multids-1.1.0.tar.gz
Release files / multids-1.1.0-py3-none-any.whl
Security for multids 1.1.0
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.
Release history Release notifications | RSS feed
Dec 5, 2026 2 release files No provenance
Nov 30, 2026 2 release files No provenance
Nov 22, 2026 2 release files No provenance
Aug 15, 2026 2 release files No provenance
Dec 16, 2025 2 release files No provenance
Dec 6, 2025 2 release files No provenance
"PyPI", "Python Package Index", and the blocks logos are registered trademarks of the Python Software Foundation.
© 2026 Python Software Foundation
Deployed from 4d99e05











