{"id":39617219,"url":"https://github.com/amenra/unified-io","last_synced_at":"2026-01-18T08:20:25.607Z","repository":{"id":167230504,"uuid":"642777626","full_name":"AmenRa/unified-io","owner":"AmenRa","description":"Unified I/O interface for Python.","archived":false,"fork":false,"pushed_at":"2025-11-28T12:47:47.000Z","size":597,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-30T04:11:13.960Z","etag":null,"topics":["python"],"latest_commit_sha":null,"homepage":"https://amenra.github.io/unified-io/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AmenRa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-05-19T10:20:17.000Z","updated_at":"2025-11-28T12:47:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"ac3eb8e9-be51-440c-9e5a-acb434d5b1a6","html_url":"https://github.com/AmenRa/unified-io","commit_stats":null,"previous_names":["amenra/unified-io"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AmenRa/unified-io","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AmenRa%2Funified-io","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AmenRa%2Funified-io/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AmenRa%2Funified-io/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AmenRa%2Funified-io/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AmenRa","download_url":"https://codeload.github.com/AmenRa/unified-io/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AmenRa%2Funified-io/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28534143,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T00:39:45.795Z","status":"online","status_checked_at":"2026-01-18T02:00:07.578Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["python"],"created_at":"2026-01-18T08:20:23.537Z","updated_at":"2026-01-18T08:20:25.596Z","avatar_url":"https://github.com/AmenRa.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003c!-- Python --\u003e\n  \u003ca href=\"https://www.python.org\" alt=\"Python\"\u003e\n      \u003cimg src=\"https://badges.aleen42.com/src/python.svg\" /\u003e\n  \u003c/a\u003e\n  \u003c!-- Version --\u003e\n  \u003ca href=\"https://badge.fury.io/py/unified-io\"\u003e\u003cimg src=\"https://badge.fury.io/py/unified-io.svg\" alt=\"PyPI version\" height=\"18\"\u003e\u003c/a\u003e\n  \u003c!-- Black --\u003e\n  \u003ca href=\"https://github.com/psf/black\" alt=\"Code style: black\"\u003e\n      \u003cimg src=\"https://img.shields.io/badge/code%20style-black-000000.svg\" /\u003e\n  \u003c/a\u003e\n  \u003c!-- License --\u003e\n  \u003ca href=\"https://lbesson.mit-license.org/\"\u003e\u003cimg src=\"https://img.shields.io/badge/License-MIT-blue.svg\" alt=\"License: MIT\"\u003e\u003c/a\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n## ⚡️ Introduction\n\n[unified-io](https://github.com/AmenRa/unified-io) is a Python utility that attempts to unify several I/O operations (i.e., read/write data in different formats) under a similar interface while making them more concise and user-friendly.\n\nThe library provides a unified interface for reading/writing files, which is based on the following principles:  \n\n- Read/write interfaces consist of concise functions with similar signatures.  \n- Read/write interfaces allows passing keyword arguments to the underlying I/O functions to preserve flexibility.  \n- Read operations can be performed lazily using generators.  \n- Before reading/writing, the user can specify a callback function that will be applied to each element of the data stream.  \n- _read_ functions have _load_ aliases (e.g., `read_csv` has a `load_csv` alias) and _write_ functions have _save_ aliases (e.g., `write_csv` has a `save_csv` alias.  \n- Use very efficient stuff for each format (e.g., [`orjson`](https://github.com/ijl/orjson) for `json` files). Suggestions are welcome!\n\n## ✨ Supported formats\n\n- [CSV](https://en.wikipedia.org/wiki/Comma-separated_values) and similar formats (e.g., TSV, PSV, etc.)\n- [GZIP](https://en.wikipedia.org/wiki/Gzip)\n- [JSON](https://en.wikipedia.org/wiki/JSON)\n- [JSONl](https://jsonlines.org)\n- [LZ4](https://en.wikipedia.org/wiki/LZ4_(compression_algorithm))\n- [Numpy](https://numpy.org) (`.npy`)\n- [Pickle](https://docs.python.org/3/library/pickle.html)\n- [Text](https://en.wikipedia.org/wiki/Text_file)\n- [YAML](https://en.wikipedia.org/wiki/YAML)\n\n## 🔌 Requirements\n```\npython\u003e=3.7\n```\n\n## 💾 Installation\n```bash\npip install unified-io\n```\n\n## 💡 Examples\n\nThe API is designed to be as simple as possible. For example, the following code snippet reads a CSV file, applies a callback function to each element of the data stream, and writes the result to a JSONl file:\n```python\nfrom unified_io import read_csv, write_jsonl\n\ndef callback(x):\n    return {\"id\": x[\"id\"], \"title\": x[\"title\"].lower()}\n\n# Using a generator we avoid loading the entire file into memory\ndata = read_csv('input.csv', callback=callback, generator=True)\n\nwrite_jsonl('output.jsonl', data)\n```\n\n## 📚 Documentation\nBrowse the [documentation](https://amenra.github.io/unified-io) for more details and examples.\n\n## 🎁 Feature Requests\nWould you like to see other features implemented? Please, open a [feature request](https://github.com/AmenRa/unified-io/issues/new?assignees=\u0026labels=enhancement\u0026template=feature_request.md\u0026title=%5BFeature+Request%5D+title).\n\n\n## 🤘 Want to contribute?\nWould you like to contribute? Please, drop me an [e-mail](mailto:elias.bssn@gmail.com?subject=[GitHub]%20unified-io).\n\n\n## 📄 License\n[unified-io](https://github.com/AmenRa/unified-io) is an open-sourced software licensed under the [MIT license](LICENSE).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famenra%2Funified-io","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famenra%2Funified-io","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famenra%2Funified-io/lists"}