readwrite


Namereadwrite JSON
Version 0.8.0 PyPI version JSON
download
home_pagehttps://github.com/crunchdao/readwrite
Summaryreadwrite - Quickly read/write file in common formats
upload_time2024-08-30 13:02:01
maintainerNone
docs_urlNone
authorEnzo CACERES
requires_python>=3
licenseNone
keywords package development template
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Quickly read and write file based on their extension.

[![PyTest](https://github.com/crunchdao/readwrite/actions/workflows/pytest.yml/badge.svg)](https://github.com/crunchdao/readwrite/actions/workflows/pytest.yml)

- [Install](#install)
- [CLI Usage](#cli-usage)
- [Code Usage](#code-usage)
- [Supported Extensions](#supported-extensions)

## Install

```
python3 -m pip install --upgrade readwrite
```

## CLI Usage

```bash
readf [FILE-PATHS...]
```

or

```bash
readfile <EXTENSION> [EXTENSION-SPECIFIC-OPTIONS] [FILE-PATHS...]
```

## Code Usage

```python
import readwrite as rw

# will use pandas.read_csv(...)
df = rw.read("data.csv")

# will use pandas.to_parquet(...)
rw.write(df, "data.parquet")
```

## Supported Extensions

| Handler | Extensions | Backend | Read | Write |
| --- | --- | --- |:---:|:---:|
| [Binary](./readwrite/handlers/binary.py) | `bin` | [Python's `bytes`](https://docs.python.org/3/library/stdtypes.html#bytes) | :heavy_check_mark: | :heavy_check_mark: |
| [Csv](./readwrite/handlers/csv.py) | `csv` | [`pandas`](https://pandas.pydata.org/) | :heavy_check_mark: | :heavy_check_mark: |
| [Excel](./readwrite/handlers/excel.py) | `xlsx` | [`pandas`](https://pandas.pydata.org/) | :heavy_check_mark: | :heavy_check_mark: |
| [Joblib](./readwrite/handlers/joblib.py) | `joblib` | [`joblib`](https://joblib.readthedocs.io/) | :heavy_check_mark: | :heavy_check_mark: |
| [Json](./readwrite/handlers/json.py) | `json` | [Python's `json`](https://docs.python.org/3/library/json.html) | :heavy_check_mark: | :heavy_check_mark: |
| [Parquet](./readwrite/handlers/parquet.py) | `parquet` | [`pandas`](https://pandas.pydata.org/) | :heavy_check_mark: | :heavy_check_mark: |
| [Pickle](./readwrite/handlers/pickle.py) | `pkl`, `pickle` | [Python's `pickle`](https://docs.python.org/3/library/pickle.html) or [`pandas`](https://pandas.pydata.org/) | :heavy_check_mark: | :heavy_check_mark: |
| [Toml](./readwrite/handlers/toml.py) | `toml` | [`toml`](https://pypi.org/project/toml/) | :heavy_check_mark: | :heavy_check_mark: |
| [Tar](./readwrite/handlers/tar.py) | `tar` | [Python's `tarfile`](https://docs.python.org/3/library/tarfile.html) | :heavy_check_mark: | :x: |
| [Text](./readwrite/handlers/text.py) | `txt` | [Python's `str`](https://docs.python.org/3/library/stdtypes.html#str) | :heavy_check_mark: | :heavy_check_mark: |
| [Yaml](./readwrite/handlers/yaml.py) | `yml`, `yaml` | [`PyYAML`](https://pyyaml.org/) | :heavy_check_mark: | :heavy_check_mark: |
| [Zip](./readwrite/handlers/zip.py) | `zip` | [Python's `zipfile`](https://docs.python.org/3/library/zipfile.html) | :heavy_check_mark: | :x: |

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/crunchdao/readwrite",
    "name": "readwrite",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3",
    "maintainer_email": null,
    "keywords": "package development template",
    "author": "Enzo CACERES",
    "author_email": "enzo.caceres@crunchdao.com",
    "download_url": "https://files.pythonhosted.org/packages/f1/16/a24c13842cfa7fbb33b587574243f33d956d7b6f002bf271dd4323b25e22/readwrite-0.8.0.tar.gz",
    "platform": null,
    "description": "Quickly read and write file based on their extension.\n\n[![PyTest](https://github.com/crunchdao/readwrite/actions/workflows/pytest.yml/badge.svg)](https://github.com/crunchdao/readwrite/actions/workflows/pytest.yml)\n\n- [Install](#install)\n- [CLI Usage](#cli-usage)\n- [Code Usage](#code-usage)\n- [Supported Extensions](#supported-extensions)\n\n## Install\n\n```\npython3 -m pip install --upgrade readwrite\n```\n\n## CLI Usage\n\n```bash\nreadf [FILE-PATHS...]\n```\n\nor\n\n```bash\nreadfile <EXTENSION> [EXTENSION-SPECIFIC-OPTIONS] [FILE-PATHS...]\n```\n\n## Code Usage\n\n```python\nimport readwrite as rw\n\n# will use pandas.read_csv(...)\ndf = rw.read(\"data.csv\")\n\n# will use pandas.to_parquet(...)\nrw.write(df, \"data.parquet\")\n```\n\n## Supported Extensions\n\n| Handler | Extensions | Backend | Read | Write |\n| --- | --- | --- |:---:|:---:|\n| [Binary](./readwrite/handlers/binary.py) | `bin` | [Python's `bytes`](https://docs.python.org/3/library/stdtypes.html#bytes) | :heavy_check_mark: | :heavy_check_mark: |\n| [Csv](./readwrite/handlers/csv.py) | `csv` | [`pandas`](https://pandas.pydata.org/) | :heavy_check_mark: | :heavy_check_mark: |\n| [Excel](./readwrite/handlers/excel.py) | `xlsx` | [`pandas`](https://pandas.pydata.org/) | :heavy_check_mark: | :heavy_check_mark: |\n| [Joblib](./readwrite/handlers/joblib.py) | `joblib` | [`joblib`](https://joblib.readthedocs.io/) | :heavy_check_mark: | :heavy_check_mark: |\n| [Json](./readwrite/handlers/json.py) | `json` | [Python's `json`](https://docs.python.org/3/library/json.html) | :heavy_check_mark: | :heavy_check_mark: |\n| [Parquet](./readwrite/handlers/parquet.py) | `parquet` | [`pandas`](https://pandas.pydata.org/) | :heavy_check_mark: | :heavy_check_mark: |\n| [Pickle](./readwrite/handlers/pickle.py) | `pkl`, `pickle` | [Python's `pickle`](https://docs.python.org/3/library/pickle.html) or [`pandas`](https://pandas.pydata.org/) | :heavy_check_mark: | :heavy_check_mark: |\n| [Toml](./readwrite/handlers/toml.py) | `toml` | [`toml`](https://pypi.org/project/toml/) | :heavy_check_mark: | :heavy_check_mark: |\n| [Tar](./readwrite/handlers/tar.py) | `tar` | [Python's `tarfile`](https://docs.python.org/3/library/tarfile.html) | :heavy_check_mark: | :x: |\n| [Text](./readwrite/handlers/text.py) | `txt` | [Python's `str`](https://docs.python.org/3/library/stdtypes.html#str) | :heavy_check_mark: | :heavy_check_mark: |\n| [Yaml](./readwrite/handlers/yaml.py) | `yml`, `yaml` | [`PyYAML`](https://pyyaml.org/) | :heavy_check_mark: | :heavy_check_mark: |\n| [Zip](./readwrite/handlers/zip.py) | `zip` | [Python's `zipfile`](https://docs.python.org/3/library/zipfile.html) | :heavy_check_mark: | :x: |\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "readwrite - Quickly read/write file in common formats",
    "version": "0.8.0",
    "project_urls": {
        "Homepage": "https://github.com/crunchdao/readwrite"
    },
    "split_keywords": [
        "package",
        "development",
        "template"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a8253260d41199d97b00b7d37031e9297eece529958596cc61efcc1e83cf2cfc",
                "md5": "b38731b5e8257e98b6f060a71de275ea",
                "sha256": "90c638487ade8c6128406f812ff5bb02af217f517bb6475318c68bee6d5fb16f"
            },
            "downloads": -1,
            "filename": "readwrite-0.8.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b38731b5e8257e98b6f060a71de275ea",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3",
            "size": 16716,
            "upload_time": "2024-08-30T13:02:00",
            "upload_time_iso_8601": "2024-08-30T13:02:00.161537Z",
            "url": "https://files.pythonhosted.org/packages/a8/25/3260d41199d97b00b7d37031e9297eece529958596cc61efcc1e83cf2cfc/readwrite-0.8.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f116a24c13842cfa7fbb33b587574243f33d956d7b6f002bf271dd4323b25e22",
                "md5": "ae7c41d4f3c215d80f85643084a34c86",
                "sha256": "b976bbefd51fe4c573f10a2f849fa7f4ecaa716b941eb5892fd05eb5fa28266c"
            },
            "downloads": -1,
            "filename": "readwrite-0.8.0.tar.gz",
            "has_sig": false,
            "md5_digest": "ae7c41d4f3c215d80f85643084a34c86",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3",
            "size": 10679,
            "upload_time": "2024-08-30T13:02:01",
            "upload_time_iso_8601": "2024-08-30T13:02:01.075457Z",
            "url": "https://files.pythonhosted.org/packages/f1/16/a24c13842cfa7fbb33b587574243f33d956d7b6f002bf271dd4323b25e22/readwrite-0.8.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-30 13:02:01",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "crunchdao",
    "github_project": "readwrite",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "readwrite"
}
        
Elapsed time: 0.42976s