Skip to main content

Data SDK for AI Agents

Project description

SATIF SDK

License: MIT Python Version

Core implementation of the SATIF data standardization and transformation capabilities.

Table of Contents

Overview

The satif-sdk package provides concrete implementations of the SATIF toolkit's standardization and transformation capabilities without AI assistance. It serves as the foundation for the AI-powered satif-ai package while remaining usable as a standalone library for data processing workflows.

Key functionality includes:

  • Converting heterogeneous source files (CSV, Excel, PDF, etc.) into the Standardized Data Interoperable Format (SDIF)
  • Executing transformation logic to convert SDIF data into target output formats
  • Supporting both manual code-based workflows and the AI-assisted pipelines in the higher-level packages

Installation

From PyPI

pip install satif-sdk

With AI capabilities (includes satif-ai)

pip install satif-sdk[ai]

From Source (for Development)

git clone https://github.com/syncpulse-solutions/satif.git
cd satif/libs/sdk
poetry install

Usage

Standardization

Convert input files to SDIF format:

from pathlib import Path
from satif_sdk.standardizers import CSVStandardizer

# Create a standardizer for CSV files
csv_standardizer = CSVStandardizer()

# Standardize a CSV file (or list of files) into an SDIF database
result = csv_standardizer.standardize(
    input_path=["data.csv", "reference.csv"],
    output_path="standardized_data.sdif",
    overwrite=True
)

Transformation

Transform SDIF data using custom Python code:

from pathlib import Path
from satif_sdk.transformers import CodeTransformer

# Define transformation logic
def transform_data(conn):
    """
    Transform SDIF data into the desired output format.

    Args:
        conn: SQLite connection to the SDIF database

    Returns:
        dict mapping filenames to their contents
    """
    import pandas as pd

    # Query data from SDIF tables
    df = pd.read_sql_query("SELECT * FROM db1.data", conn)

    # Apply transformations
    df['calculated_value'] = df['value'] * 2

    # Return output files
    return {
        "output.csv": df,
        "summary.json": {"total_records": len(df), "average": df['value'].mean()}
    }

# Create transformer and execute
transformer = CodeTransformer(function=transform_data)
result = transformer.export(
    sdif="standardized_data.sdif",
    output_path="output_directory"
)

print(f"Transformation outputs created at: {result}")

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Maintainer: Bryan Djafer (bryan.djafer@syncpulse.fr)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

satif_sdk-0.2.5.tar.gz (69.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

satif_sdk-0.2.5-py3-none-any.whl (78.9 kB view details)

Uploaded Python 3

File details

Details for the file satif_sdk-0.2.5.tar.gz.

File metadata

  • Download URL: satif_sdk-0.2.5.tar.gz
  • Upload date:
  • Size: 69.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for satif_sdk-0.2.5.tar.gz
Algorithm Hash digest
SHA256 fb937a69a52a62c369611e2778de7990cca892624eb5d7b755f3a774d20ecfc9
MD5 6a6a8dc8c66807a7b0e04ab518f3741b
BLAKE2b-256 7cd68e795770085ba0e120f521b855e3b01b22aec45c8afbbcbf48498a1094b5

See more details on using hashes here.

Provenance

The following attestation bundles were made for satif_sdk-0.2.5.tar.gz:

Publisher: publish_satif_sdk.yml on syncpulse-solutions/satif

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file satif_sdk-0.2.5-py3-none-any.whl.

File metadata

  • Download URL: satif_sdk-0.2.5-py3-none-any.whl
  • Upload date:
  • Size: 78.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for satif_sdk-0.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 92ac9aa6f2abf1670fdc7bd911bd9709ad86f1320847bcfc80cc415185e96f47
MD5 13e672cfe3176b3800ea894dd7e332c4
BLAKE2b-256 721cfe62c1aa6ed098b863bd57d9b29ebd90aecdc136fba8ac0b6bca14b954af

See more details on using hashes here.

Provenance

The following attestation bundles were made for satif_sdk-0.2.5-py3-none-any.whl:

Publisher: publish_satif_sdk.yml on syncpulse-solutions/satif

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page