msv


Namemsv JSON
Version 1.0.3 PyPI version JSON
download
home_pagehttps://github.com/stackblitz/msv
SummaryA powerful CLI tool for merging and transforming CSV/XLSX files
upload_time2024-11-04 03:27:58
maintainerNone
docs_urlNone
authorVishal Gandhi
requires_python>=3.7
licenseMIT
keywords csv xlsx data merge transform cli
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # MSV - Merge Source Values

A powerful CLI tool for merging and transforming CSV/XLSX files with natural language support.

## Features
- Merge data from CSV and Excel files
- Case-sensitive or case-insensitive matching
- Multiple join types (left, right, outer, inner)
- Excel sheet support
- Natural language interface
- Column mapping with custom names

## Installation
```bash
pip install msv
```

## Usage

### Command Line

```bash
msv --source customers.csv --destination orders.csv --match-column email --columns "name,phone"
```

### Natural Language Interface

```bash
msv --natural
> merge customers.csv and orders.csv using email column, copy name and phone, ignore case
```

### Options

- `--source, -s`: Source file path (.csv or .xlsx)
- `--destination, -d`: Destination file path (.csv or .xlsx)
- `--match-column, -m`: Column to match between files
- `--columns, -c`: Columns to copy (comma-separated)
- `--ignore-case, -i`: Ignore case when matching
- `--join`: Join type (left, outer, inner)
- `--output, -o`: Custom output file path
- `--source-sheet`: Sheet name for source Excel file
- `--dest-sheet`: Sheet name for destination Excel file
- `--output-sheet`: Sheet name for output Excel file (defaults to dest-sheet)

### Excel Sheet Support

When working with Excel files (.xlsx), you can specify sheet names:

```bash
# Merge specific sheets from Excel files
msv \
  --source users.xlsx \
  --destination accounts.xlsx \
  --match-column email \
  --columns "name,phone" \
  --source-sheet Users \
  --dest-sheet Accounts

# Write to a different output sheet
msv \
  --source data.xlsx \
  --destination report.xlsx \
  --match-column id \
  --columns "value,category" \
  --source-sheet Raw \
  --dest-sheet Current \
  --output-sheet "March 2024"
```

If no sheet is specified:
- For source files: Uses the first sheet
- For destination files: Uses the first sheet or creates "Sheet1"
- Available sheets are listed when reading Excel files

## Configuration

The application supports multiple AI providers for natural language processing. Configure your preferred settings in `config.toml`:

1. Copy the example configuration file:
```bash
cp config.toml.example config.toml
```

## Development

### Requirements

- Python 3.7+
- pandas
- openpyxl
 
### Running Tests
```bash
python -m unittest discover tests
```

## License

MIT

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/stackblitz/msv",
    "name": "msv",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "csv, xlsx, data, merge, transform, cli",
    "author": "Vishal Gandhi",
    "author_email": "Vishal Gandhi <igandhivishal@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/b3/e8/25988d062177fedd1b2d7ba0b9cbf622e56f003c1df0c08fb35309e73846/msv-1.0.3.tar.gz",
    "platform": null,
    "description": "# MSV - Merge Source Values\n\nA powerful CLI tool for merging and transforming CSV/XLSX files with natural language support.\n\n## Features\n- Merge data from CSV and Excel files\n- Case-sensitive or case-insensitive matching\n- Multiple join types (left, right, outer, inner)\n- Excel sheet support\n- Natural language interface\n- Column mapping with custom names\n\n## Installation\n```bash\npip install msv\n```\n\n## Usage\n\n### Command Line\n\n```bash\nmsv --source customers.csv --destination orders.csv --match-column email --columns \"name,phone\"\n```\n\n### Natural Language Interface\n\n```bash\nmsv --natural\n> merge customers.csv and orders.csv using email column, copy name and phone, ignore case\n```\n\n### Options\n\n- `--source, -s`: Source file path (.csv or .xlsx)\n- `--destination, -d`: Destination file path (.csv or .xlsx)\n- `--match-column, -m`: Column to match between files\n- `--columns, -c`: Columns to copy (comma-separated)\n- `--ignore-case, -i`: Ignore case when matching\n- `--join`: Join type (left, outer, inner)\n- `--output, -o`: Custom output file path\n- `--source-sheet`: Sheet name for source Excel file\n- `--dest-sheet`: Sheet name for destination Excel file\n- `--output-sheet`: Sheet name for output Excel file (defaults to dest-sheet)\n\n### Excel Sheet Support\n\nWhen working with Excel files (.xlsx), you can specify sheet names:\n\n```bash\n# Merge specific sheets from Excel files\nmsv \\\n  --source users.xlsx \\\n  --destination accounts.xlsx \\\n  --match-column email \\\n  --columns \"name,phone\" \\\n  --source-sheet Users \\\n  --dest-sheet Accounts\n\n# Write to a different output sheet\nmsv \\\n  --source data.xlsx \\\n  --destination report.xlsx \\\n  --match-column id \\\n  --columns \"value,category\" \\\n  --source-sheet Raw \\\n  --dest-sheet Current \\\n  --output-sheet \"March 2024\"\n```\n\nIf no sheet is specified:\n- For source files: Uses the first sheet\n- For destination files: Uses the first sheet or creates \"Sheet1\"\n- Available sheets are listed when reading Excel files\n\n## Configuration\n\nThe application supports multiple AI providers for natural language processing. Configure your preferred settings in `config.toml`:\n\n1. Copy the example configuration file:\n```bash\ncp config.toml.example config.toml\n```\n\n## Development\n\n### Requirements\n\n- Python 3.7+\n- pandas\n- openpyxl\n \n### Running Tests\n```bash\npython -m unittest discover tests\n```\n\n## License\n\nMIT\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A powerful CLI tool for merging and transforming CSV/XLSX files",
    "version": "1.0.3",
    "project_urls": {
        "Homepage": "https://github.com/ivishalgandhi/msv"
    },
    "split_keywords": [
        "csv",
        " xlsx",
        " data",
        " merge",
        " transform",
        " cli"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "44377cdc0ae62faa319ab5b6ac673167e357215030282f285ada67ab91face18",
                "md5": "f3432c131c051876537464b257572b63",
                "sha256": "113085f06fe51a86cc2d1f2eec0836d7ac7c35aebe91876fa00fd1768d767dff"
            },
            "downloads": -1,
            "filename": "msv-1.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f3432c131c051876537464b257572b63",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 11150,
            "upload_time": "2024-11-04T03:27:57",
            "upload_time_iso_8601": "2024-11-04T03:27:57.141171Z",
            "url": "https://files.pythonhosted.org/packages/44/37/7cdc0ae62faa319ab5b6ac673167e357215030282f285ada67ab91face18/msv-1.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b3e825988d062177fedd1b2d7ba0b9cbf622e56f003c1df0c08fb35309e73846",
                "md5": "8b35c7b361b5e61f2532e7af3902619a",
                "sha256": "11404ce213da174f306e450be66a42c0106582146163edfb59ada5bd416522d6"
            },
            "downloads": -1,
            "filename": "msv-1.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "8b35c7b361b5e61f2532e7af3902619a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 11681,
            "upload_time": "2024-11-04T03:27:58",
            "upload_time_iso_8601": "2024-11-04T03:27:58.496756Z",
            "url": "https://files.pythonhosted.org/packages/b3/e8/25988d062177fedd1b2d7ba0b9cbf622e56f003c1df0c08fb35309e73846/msv-1.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-04 03:27:58",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "stackblitz",
    "github_project": "msv",
    "github_not_found": true,
    "lcname": "msv"
}
        
Elapsed time: 0.33489s