Metadata-Version: 2.4
Name: bclearer-interop-services
Version: 0.10.0
Summary: "A set of interop services to integrate and transfer data between different applications, model and storage technologies for the bclearer framework."
Author-email: Mesbah Khan <khanm@ontoledgy.io>
License-Expression: AGPL-3.0-or-later
License-File: LICENSE.md
Requires-Python: >=3.12
Requires-Dist: bclearer-orchestration-services<0.6.0,>=0.5.0
Requires-Dist: chardet
Requires-Dist: cozo-embedded==0.7.6
Requires-Dist: jsonpickle
Requires-Dist: jsonschema
Requires-Dist: lxml
Requires-Dist: nest-asyncio
Requires-Dist: networkx
Requires-Dist: numpy
Requires-Dist: openpyxl
Requires-Dist: pandas
Requires-Dist: psutil
Requires-Dist: psycopg2-binary
Requires-Dist: pycozo==0.7.6
Requires-Dist: pydantic
Requires-Dist: python-multipart>=0.0.22
Requires-Dist: pyyaml
Requires-Dist: regex
Requires-Dist: sqlalchemy
Requires-Dist: tqdm
Provides-Extra: archives
Requires-Dist: py7zr; extra == 'archives'
Provides-Extra: async
Requires-Dist: aiofiles>=24.1.0; extra == 'async'
Provides-Extra: basex
Requires-Dist: basexclient; extra == 'basex'
Provides-Extra: excel
Requires-Dist: openpyxl; extra == 'excel'
Requires-Dist: xlrd; extra == 'excel'
Provides-Extra: influxdb
Requires-Dist: influxdb-client; extra == 'influxdb'
Provides-Extra: langchain
Requires-Dist: langchain; extra == 'langchain'
Requires-Dist: langchain-community; extra == 'langchain'
Provides-Extra: mongo
Requires-Dist: pymongo; extra == 'mongo'
Provides-Extra: neo4j
Requires-Dist: graphviz; extra == 'neo4j'
Requires-Dist: neo4j; extra == 'neo4j'
Requires-Dist: py4cytoscape; extra == 'neo4j'
Provides-Extra: notebook
Requires-Dist: ipython; extra == 'notebook'
Provides-Extra: parquet
Requires-Dist: delta-spark; extra == 'parquet'
Requires-Dist: deltalake; extra == 'parquet'
Requires-Dist: fastparquet; extra == 'parquet'
Requires-Dist: polars; extra == 'parquet'
Provides-Extra: raphtory
Requires-Dist: raphtory; extra == 'raphtory'
Provides-Extra: spark
Requires-Dist: pyspark; extra == 'spark'
Provides-Extra: visualisation
Requires-Dist: graphviz; extra == 'visualisation'
Requires-Dist: matplotlib; extra == 'visualisation'
Requires-Dist: py4cytoscape; extra == 'visualisation'
Provides-Extra: windows
Requires-Dist: msaccessdb; (platform_system == 'Windows') and extra == 'windows'
Requires-Dist: pyodbc; (platform_system == 'Windows') and extra == 'windows'
Requires-Dist: pywin32; (platform_system == 'Windows') and extra == 'windows'
Provides-Extra: yxdb
Requires-Dist: yxdb>=1.1.1; extra == 'yxdb'
Description-Content-Type: text/markdown

# bclearer-interop-services

A set of I/O and interop connectors for the bclearer framework. It provides adapters to read and write data between in-memory “universe” representations and a variety of storage, file formats, and application services.

## Installation

```bash
pip install bclearer-interop-services
```

## Key Features

- **Dictionary Service**
  Convert data to and from generic Python dictionaries (e.g., mapping objects to table dictionaries).
- **DataFrame Service**
  Utilities for standardizing, filtering, merging, and converting Pandas (and PySpark) DataFrames.
- **Delimited Text**
  Read/write CSV and other delimited formats.
- **Excel Services**
  Import/export Excel (.xlsx) files.
- **JSON, XML, HDF5, Parquet**
  Native serializers and readers for common data formats.
- **Relational Database Services**
  Access MS Access, SQLite, and other RDBMS via SQL interfaces.
- **Document Store Services**
  MongoDB and JSON file store support.
- **Graph Services**
  Neo4j connector and network analysis utilities.
- **EA Interop Service**
  COM-based, SQL, and XML import/export for Enterprise Architect models.
- **Session & Orchestration**
  Helpers to manage connections, sessions, and orchestrate multi-step data flows.

## Basic Usage

Below is a simple example using the Dictionary and DataFrame services:

```python
from bclearer_interop_services.b_dictionary_service.table_as_dictionary_service import TableAsDictionaryFromCsvFileReader
from bclearer_interop_services.b_dictionary_service.table_as_dictionary_service import TableAsDictionaryToDataFrameConverter

# Read data from a CSV file into a table-as-dictionary
reader = TableAsDictionaryFromCsvFileReader()
table_dict = reader.read('data/example.csv')

# Convert the table-as-dictionary to a Pandas DataFrame
converter = TableAsDictionaryToDataFrameConverter()
df = converter.convert(table_dict)

# Standardize column names and filter rows using the DataFrame service
from bclearer_interop_services.dataframe_service.dataframe_helper import DataFrameHelper

helper = DataFrameHelper()
df = helper.standardize_column_names(df)
df_filtered = df[df['status'] == 'ACTIVE']
```

## Documentation

Full documentation and examples can be found in the [GitHub repository](https://github.com/OntoLedgy/ol_bclearer_pdk/tree/develop/libraries/interop_services).

## Licence

This project is licensed under the GNU Affero General Public License v3.0 or later (AGPL-3.0-or-later). See the [LICENSE](../../LICENSE) file for the full text.

Commercial licences are available for organisations that cannot comply with the AGPL's network-use and source-disclosure terms. Contact support@ontoledgy.io for details.
