Skip to main content

A high-performance data conversion, cleaning, and statistics library.

Project description

🚀 py-datamorph

Python Version License Status

py-datamorph is a high-performance, zero-dependency Python toolkit engineered for data developers and analysts. It provides a robust suite of tools for seamless data conversion (CSV, JSON, XML), deep data cleaning, and instant statistical analysis—all accessible via a powerful Command Line Interface (CLI) or as an importable module.

Developed as a professional utility, it eliminates the overhead of heavy libraries like pandas for essential data transformation tasks.


🌟 Key Features

  • Multi-Format Conversion: Effortlessly transform datasets between CSV, JSON, and XML formats.
  • Deep Data Cleaning: Automatically purge empty rows, strip invisible whitespace from cells, and gracefully handle real-world encoding issues like Excel's BOM (utf-8-sig).
  • Instant Data Statistics: Generate comprehensive analytical reports (row counts, column definitions, file size) for any CSV file directly in your terminal.
  • Zero Dependencies: Built 100% on Python's Standard Library. It’s lightweight, secure, and incredibly fast.
  • Interactive CLI: A polished, mutually-exclusive command-line tool for immediate terminal usage without writing any code.

🛠️ Installation

You can install py-datamorph directly into your local Python environment.

Local Installation

Navigate to the root directory of the project (where setup.py is located) and run:

pip install .

💻 Usage: Command Line Interface (CLI)

After installation, the datamorph command becomes available globally in your terminal.

1. Data Conversion

Easily switch between data formats. The output file is automatically generated in the same directory.

# Convert CSV to JSON
datamorph --csv2json dataset.csv

# Convert JSON to CSV
datamorph --json2csv data.json

# Convert XML to JSON
datamorph --xml2json config.xml

2. Deep Data Cleaning

Sanitize messy CSV files before feeding them into databases or machine learning models.

datamorph --clean raw_data.csv

(Outputs a sanitized file named raw_data_pro_cleaned.csv)

3. Dataset Analysis

Get a quick technical overview of your CSV dataset without writing a single line of code.

datamorph --stats sales_data.csv

🐍 Usage: As a Python Module

You can easily integrate py-datamorph into your own custom Python scripts.

from py_datamorph.converter import DataMorphConverter
from py_datamorph.cleaner import DataMorphCleaner

# Initialize the toolkit
conv = DataMorphConverter()
cleaner = DataMorphCleaner()

# 1. Convert files programmatically
json_file_path = conv.csv_to_json("employees.csv")

# 2. Get dataset statistics as a dictionary
stats = cleaner.get_stats("employees.csv")
print(f"Dataset contains {stats['Total Records']} rows.")

🏗️ Project Architecture

py-datamorph/
├── py_datamorph/
│   ├── __init__.py        # Package initialization
│   ├── converter.py       # Core conversion logic (CSV/JSON/XML)
│   ├── cleaner.py         # Advanced data cleaning & statistics logic
│   └── cli.py             # Command-line argument parsing and routing
├── setup.py               # Package build and distribution configuration
└── README.md              # Project documentation

📝 License

This project is licensed under the MIT License. You are free to use, modify, and distribute this software for both educational and commercial purposes.


👨‍💻 Developed By

Sk Sahagir Academic Details:

  • Course: Bachelor of Technology in Information Technology (IT)
  • Institute: Government College of Engineering & Textile Technology, Serampore
  • Roll No: 11000224051
  • Batch: 2024-'28
  • Connect with me:

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

py_datamorph_sks-1.0.0.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

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

py_datamorph_sks-1.0.0-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file py_datamorph_sks-1.0.0.tar.gz.

File metadata

  • Download URL: py_datamorph_sks-1.0.0.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.5

File hashes

Hashes for py_datamorph_sks-1.0.0.tar.gz
Algorithm Hash digest
SHA256 d6d71f8d55e83d15f85eb3f9ac3c0eb968ccee0c2cba464c828a0066b4cf38d8
MD5 814d71962e99890f18f81809116514fc
BLAKE2b-256 c0e5a062cbdaf5dc2c2e874db5b2029186e2de03b14db2dfab710c60001bd371

See more details on using hashes here.

File details

Details for the file py_datamorph_sks-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for py_datamorph_sks-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ff8c6a2f6f571d78ceddbfef2a3605df4371a9e4f3ed14ec18657bdf5ca4c8cb
MD5 3166a24d03cb932f3f6319c720cea5c6
BLAKE2b-256 dd062c2ad800830ac7da9d1631ae3e8050f8d603513a270201abf7f2a0a928b7

See more details on using hashes here.

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