Skip to main content

Data Manager

PyPI version Python Versions License: MIT GitHub Repository PyPI Downloads

Data Manager is a modular Python framework for data engineering, validation, and analytics workflows. It provides a unified, job-based architecture on top of interchangeable storage backends, enabling structured and reproducible processing of tabular datasets.


Table of Contents


Features

  • Pluggable storage backends — swap between CSV, JSON, and in-memory storage with a consistent interface
  • Job-based execution model — cleanly separates engineering, validation, and analytics concerns
  • Data engineering utilities — remove duplicates, handle missing values
  • Data validation — schema validation, data type checks, and nullability checks
  • Data analytics & profiling — summary statistics, column-level analysis, missing value reports, and full dataset profiling
  • Fully tested — comprehensive test suite using pytest with coverage reporting

Installation

Install from PyPI:

pip install data-manager-framework

Requirements: Python ≥ 3.12, pandas, numpy


Architecture Overview

Data Manager is built around two core concepts:

  1. Storage Backends — responsible for reading, holding, and writing data. All backends expose a consistent interface (read, write, data), so jobs are fully decoupled from the underlying file format.

  2. Jobs — stateless workers that accept a storage object and operate on its data. The three built-in job classes are DataEngineer, DataValidation, and DataAnalytics.

┌─────────────────────────────────────────────────────┐
│                    Your Application                  │
└──────────────────────────┬──────────────────────────┘
                           │
              ┌────────────▼────────────┐
              │     Storage Backend     │
              │  CSVStorage             │
              │  JSONStorage            │
              │  InMemoryStorage        │
              └────────────┬────────────┘
                           │
         ┌─────────────────┼─────────────────┐
         │                 │                 │
┌────────▼───────┐ ┌───────▼──────┐ ┌───────▼────────┐
│  DataEngineer  │ │DataValidation│ │ DataAnalytics  │
│  - duplicates  │ │  - schema    │ │  - summary     │
│  - null values │ │  - types     │ │  - profiling   │
└────────────────┘ │  - nulls     │ │  - statistics  │
                   └──────────────┘ └────────────────┘

Quick Start

from data_manager.storage.csv_backend import CSVStorage
from data_manager.jobs.data_analytics import DataAnalytics

# Load data
storage = CSVStorage()
storage.load("data.csv")

# Run analytics
analytics = DataAnalytics(storage)
print(analytics.summary())

Storage Backends

All storage backends share the same interface. You can swap one for another without changing any of your job code.

CSVStorage

Reads and writes CSV files using pandas.

from data_manager.storage.csv_backend import CSVStorage

storage = CSVStorage()
storage.load("data.csv")

# Access the underlying DataFrame
print(storage.data.head())

# Write back to disk
storage.write("output.csv")

JSONStorage

Reads and writes JSON files.

from data_manager.storage.json_backend import JSONStorage

storage = JSONStorage()
storage.load("data.json")
storage.write("output.json")

InMemoryStorage

Holds data in memory — useful for testing or for passing a pre-built pandas DataFrame directly into the job pipeline.

import pandas as pd
from data_manager.storage.In_memory_backend import InMemoryStorage

df = pd.DataFrame({"name": ["Alice", "Bob"], "age": [30, 25]})

storage = InMemoryStorage()
storage.data = df

Jobs

Jobs accept a storage object in their constructor and operate on storage.data. They do not read or write files themselves — that is the storage layer's responsibility.

DataEngineer

Handles data cleaning and preprocessing tasks.

from data_manager.storage.csv_backend import CSVStorage
from data_manager.jobs.data_engineer import DataEngineer

storage = CSVStorage()
storage.load("raw_data.csv")

engineer = DataEngineer(storage)

# Remove duplicate rows
engineer.removeDuplicates()

# Drop rows with any null values
engineer.removeNull()

# Persist the cleaned dataset
storage.write("cleaned_data.csv")
Method Description
removeDuplicates() Drops all fully duplicate rows from the dataset
removeNull() Drops all rows containing one or more null values

DataValidation

Validates the structure and content of a dataset against expected rules.

from data_manager.storage.csv_backend import CSVStorage
from data_manager.jobs.data_validator import DataValidator

storage = CSVStorage()
storage.load("data.csv")

validator = DataValidator(storage)

# Check for required columns and expected types
validator.validateSchema({"name": "object", "age": "int64", "salary": "float64"})

# Check that specific columns have no null values
validator.checkNullability(["name", "age"])
Method Description
validateSchema(schema) Validates that columns exist and match their expected dtypes
checkNullability(columns) Raises or reports when specified columns contain null values

DataAnalytics

Profiles and summarises a loaded dataset.

from data_manager.storage.csv_backend import CSVStorage
from data_manager.jobs.data_analytics import DataAnalytics

storage = CSVStorage()
storage.load("data.csv")

analytics = DataAnalytics(storage)

# High-level dataset summary (shape, dtypes, null counts)
print(analytics.summary())

# Per-column descriptive statistics
print(analytics.columnStats())

# Count and percentage of missing values per column
print(analytics.missingValueAnalysis())

# Count and percentage of duplicate rows
print(analytics.duplicateAnalysis())

# Full dataset profile combining all of the above
print(analytics.profile())
Method Description
summary() Returns shape, column names, dtypes, and null counts
columnStats() Returns descriptive statistics for each column
missingValueAnalysis() Returns missing value counts and percentages per column
duplicateAnalysis() Returns the number and percentage of duplicate rows
profile() Returns a comprehensive profile of the entire dataset

Example Pipeline

The following example shows a complete end-to-end workflow — loading raw data, cleaning it, validating it, and profiling the result.

from data_manager.storage.csv_backend import CSVStorage
from data_manager.jobs.data_engineer import DataEngineer
from data_manager.jobs.data_validator import DataValidator
from data_manager.jobs.data_analytics import DataAnalytics

# --- Step 1: Load ---
storage = CSVStorage()
storage.load("raw_data.csv")

# --- Step 2: Engineer ---
engineer = DataEngineer(storage)
engineer.removeDuplicates()
engineer.removeNull()

# --- Step 3: Validate ---
validator = DataValidator(storage)
validator.validateSchema({"name": "object", "age": "int64"})
validator.checkNullability(["name"])

# --- Step 4: Analyse ---
analytics = DataAnalytics(storage)
print(analytics.profile())

# --- Step 5: Save ---
storage.write("cleaned_data.csv")

Running Tests

The full test suite is written with pytest and includes coverage reporting.

Run all tests:

pytest

Run with verbose output:

pytest -v

Run with coverage report:

pytest --cov=data_manager

Roadmap

Status Feature
✅ Done CSV Backend
✅ Done JSON Backend
✅ Done In-Memory Backend
✅ Done Data Validation
✅ Done Data Analytics & Profiling
🔲 Planned Excel Backend
🔲 Planned Parquet Backend
🔲 Planned SQL Backend
🔲 Planned Automated EDA Reports

Contributing

Contributions are welcome. To get started:

  1. Fork the repository on GitHub.
  2. Clone your fork and create a new branch:
    git checkout -b feature/your-feature-name
    
  3. Install the project in editable mode:
    pip install -e .
    
  4. Make your changes and ensure all tests pass:
    pytest -v
    
  5. Open a pull request against the main branch with a clear description of your changes.

Please keep pull requests focused and scoped to a single concern. Bug fixes, new storage backends, and additional job methods are all welcome.


License

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


Author

Krish Kumar — GitHub

Metadata

Release files for data-manager-framework 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for data-manager-framework 0.2.0
File Size Uploaded Provenance Actions
data_manager_framework-0.2.0.tar.gz 15.7 kB Without provenance Details for data_manager_framework-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for data-manager-framework 0.2.0
File Interpreter ABI Platform Actions
data_manager_framework-0.2.0-py3-none-any.whl Python 3 none any Details for data_manager_framework-0.2.0-py3-none-any.whl

Total release size: 32.8 kB

Release files / data_manager_framework-0.2.0.tar.gz

Download URL data_manager_framework-0.2.0.tar.gz
Size 15.7 kB
Tags Source
SHA-256 checksum
How to use checksums
a83d092dd5c1d3a78225c272139c7876fb0b1fd94dd040ea4dab7573c27103fa
BLAKE2b-256 checksum
How to use checksums
a4ff4d9a6c8caeaaf3209fdf8996cd227f064a1eca4e3a911112092ccced212b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Release files / data_manager_framework-0.2.0-py3-none-any.whl

Download URL data_manager_framework-0.2.0-py3-none-any.whl
Size 17.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1ddfa2323eb141bd359bacbda2115a95a8557d12e4bde5e8bdfa22ca39e1695d
BLAKE2b-256 checksum
How to use checksums
3f1224ceb390c1a0924f1d9a1bbf2425748e7a0bae5382dab947c55fdd6993f9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Security for data-manager-framework 0.2.0

Provenance

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.

No provenance found

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

This release

0.2.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page