fies


Namefies JSON
Version 1.2.3 PyPI version JSON
download
home_pagehttps://github.co.jp/
SummaryA tool to easily read and write json files, pickle files, binary files, csv files and plain text files.
upload_time2022-08-06 07:25:50
maintainer
docs_urlNone
authorle_lattelle
requires_python
licenseCC0 v1.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # fies

下の方に日本語の説明があります

## Overview
- A tool to easily read and write json files, YAML files, pickle files, binary files, csv files and plain text files.

## Usage
```python
import fies

# Save json file
fies["./test.json"] = {"hoge": 23, "dummy_data": "fuga"}

# Read json file
print(fies["./test.json"])	# -> {'hoge': 23, 'dummy_data': 'fuga'}

# Save plain text file
fies["./test.txt"] = "hogehoge"

# Read plain text file
print(fies["./test.txt"])	# -> hogehoge

# Save pickle file
fies["./test.pickle"] = [("hoge", 23), 5.7]

# Read pickle file
print(fies["./test.pickle"])	# -> [('hoge', 23), 5.7]

# Save csv file
fies["./test.csv"] = [
	["hoge", "fuga"],
	[23, True],	# Numbers and bool types will be automatically converted to strings.
	['Hey, "Escape" man!\n']	# Any line breaks, commas, or double quotation marks will be automatically escaped.
]

# Save YAML file
fies["./test.yml", "yaml"] = {"hoge": {"fuga": 13, 77: [1,2]}}
```

## Advanced usage
```python
# Save binary file
fies["./test.bin", "binary"] = b"hoge"

# format-specified save
fies["./test.myext", "json"] = {"hoge": 23, "dummy_data": "fuga"}
```

## 概要
- jsonファイル, YAMLファイル, pickleファイル, バイナリファイル, csvファイル, プレーンテキストのファイルを簡単に読み書きできるツールです。

## 使い方
```python
import fies

# jsonファイル保存
fies["./test.json"] = {"hoge": 23, "dummy_data": "fuga"}

# jsonファイル読み込み
print(fies["./test.json"])	# -> {'hoge': 23, 'dummy_data': 'fuga'}

# プレーンテキストファイル書き出し
fies["./test.txt"] = "hogehoge"

# プレーンテキストファイル読み込み
print(fies["./test.txt"])	# -> hogehoge

# pickleファイル書き出し
fies["./test.pickle"] = [("hoge", 23), 5.7]

# pickleファイル読み込み
print(fies["./test.pickle"])	# -> [('hoge', 23), 5.7]

# csvファイル書き出し
fies["./test.csv"] = [
	["hoge", "fuga"],
	[23, True],	# 数値や真理値型のものは文字列に変換される
	['Hey, "Escape" man!\n']	# 改行やカンマ、ダブルクオーテーションがある場合は自動的にエスケープされる
]

# yamlファイル書き出し
fies["./test.yml", "yaml"] = {"hoge": {"fuga": 13, 77: [1,2]}}
```

## 発展的な使い方
```python
# バイナリファイル書き出し
fies["./test.bin", "binary"] = b"hoge"

# フォーマット指定書き出し
fies["./test.myext", "json"] = {"hoge": 23, "dummy_data": "fuga"}
```



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.co.jp/",
    "name": "fies",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "le_lattelle",
    "author_email": "g.tiger.ml@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/60/11/ec0059fec8b6f4edbfff52bd35b35bc6d00b45ed12f1fe0d161931d308d9/fies-1.2.3.tar.gz",
    "platform": null,
    "description": "# fies\n\n\u4e0b\u306e\u65b9\u306b\u65e5\u672c\u8a9e\u306e\u8aac\u660e\u304c\u3042\u308a\u307e\u3059\n\n## Overview\n- A tool to easily read and write json files, YAML files, pickle files, binary files, csv files and plain text files.\n\n## Usage\n```python\nimport fies\n\n# Save json file\nfies[\"./test.json\"] = {\"hoge\": 23, \"dummy_data\": \"fuga\"}\n\n# Read json file\nprint(fies[\"./test.json\"])\t# -> {'hoge': 23, 'dummy_data': 'fuga'}\n\n# Save plain text file\nfies[\"./test.txt\"] = \"hogehoge\"\n\n# Read plain text file\nprint(fies[\"./test.txt\"])\t# -> hogehoge\n\n# Save pickle file\nfies[\"./test.pickle\"] = [(\"hoge\", 23), 5.7]\n\n# Read pickle file\nprint(fies[\"./test.pickle\"])\t# -> [('hoge', 23), 5.7]\n\n# Save csv file\nfies[\"./test.csv\"] = [\n\t[\"hoge\", \"fuga\"],\n\t[23, True],\t# Numbers and bool types will be automatically converted to strings.\n\t['Hey, \"Escape\" man!\\n']\t# Any line breaks, commas, or double quotation marks will be automatically escaped.\n]\n\n# Save YAML file\nfies[\"./test.yml\", \"yaml\"] = {\"hoge\": {\"fuga\": 13, 77: [1,2]}}\n```\n\n## Advanced usage\n```python\n# Save binary file\nfies[\"./test.bin\", \"binary\"] = b\"hoge\"\n\n# format-specified save\nfies[\"./test.myext\", \"json\"] = {\"hoge\": 23, \"dummy_data\": \"fuga\"}\n```\n\n## \u6982\u8981\n- json\u30d5\u30a1\u30a4\u30eb, YAML\u30d5\u30a1\u30a4\u30eb, pickle\u30d5\u30a1\u30a4\u30eb, \u30d0\u30a4\u30ca\u30ea\u30d5\u30a1\u30a4\u30eb, csv\u30d5\u30a1\u30a4\u30eb, \u30d7\u30ec\u30fc\u30f3\u30c6\u30ad\u30b9\u30c8\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u7c21\u5358\u306b\u8aad\u307f\u66f8\u304d\u3067\u304d\u308b\u30c4\u30fc\u30eb\u3067\u3059\u3002\n\n## \u4f7f\u3044\u65b9\n```python\nimport fies\n\n# json\u30d5\u30a1\u30a4\u30eb\u4fdd\u5b58\nfies[\"./test.json\"] = {\"hoge\": 23, \"dummy_data\": \"fuga\"}\n\n# json\u30d5\u30a1\u30a4\u30eb\u8aad\u307f\u8fbc\u307f\nprint(fies[\"./test.json\"])\t# -> {'hoge': 23, 'dummy_data': 'fuga'}\n\n# \u30d7\u30ec\u30fc\u30f3\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u66f8\u304d\u51fa\u3057\nfies[\"./test.txt\"] = \"hogehoge\"\n\n# \u30d7\u30ec\u30fc\u30f3\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u8aad\u307f\u8fbc\u307f\nprint(fies[\"./test.txt\"])\t# -> hogehoge\n\n# pickle\u30d5\u30a1\u30a4\u30eb\u66f8\u304d\u51fa\u3057\nfies[\"./test.pickle\"] = [(\"hoge\", 23), 5.7]\n\n# pickle\u30d5\u30a1\u30a4\u30eb\u8aad\u307f\u8fbc\u307f\nprint(fies[\"./test.pickle\"])\t# -> [('hoge', 23), 5.7]\n\n# csv\u30d5\u30a1\u30a4\u30eb\u66f8\u304d\u51fa\u3057\nfies[\"./test.csv\"] = [\n\t[\"hoge\", \"fuga\"],\n\t[23, True],\t# \u6570\u5024\u3084\u771f\u7406\u5024\u578b\u306e\u3082\u306e\u306f\u6587\u5b57\u5217\u306b\u5909\u63db\u3055\u308c\u308b\n\t['Hey, \"Escape\" man!\\n']\t# \u6539\u884c\u3084\u30ab\u30f3\u30de\u3001\u30c0\u30d6\u30eb\u30af\u30aa\u30fc\u30c6\u30fc\u30b7\u30e7\u30f3\u304c\u3042\u308b\u5834\u5408\u306f\u81ea\u52d5\u7684\u306b\u30a8\u30b9\u30b1\u30fc\u30d7\u3055\u308c\u308b\n]\n\n# yaml\u30d5\u30a1\u30a4\u30eb\u66f8\u304d\u51fa\u3057\nfies[\"./test.yml\", \"yaml\"] = {\"hoge\": {\"fuga\": 13, 77: [1,2]}}\n```\n\n## \u767a\u5c55\u7684\u306a\u4f7f\u3044\u65b9\n```python\n# \u30d0\u30a4\u30ca\u30ea\u30d5\u30a1\u30a4\u30eb\u66f8\u304d\u51fa\u3057\nfies[\"./test.bin\", \"binary\"] = b\"hoge\"\n\n# \u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u6307\u5b9a\u66f8\u304d\u51fa\u3057\nfies[\"./test.myext\", \"json\"] = {\"hoge\": 23, \"dummy_data\": \"fuga\"}\n```\n\n\n",
    "bugtrack_url": null,
    "license": "CC0 v1.0",
    "summary": "A tool to easily read and write json files, pickle files, binary files, csv files and plain text files.",
    "version": "1.2.3",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "cca12d76fa9758e1f9274b4bf7145f16",
                "sha256": "a9dac33bdfbdf8673d26aa0a42d644c39df9bb9c5e73bfc0e0b21b29601adbf9"
            },
            "downloads": -1,
            "filename": "fies-1.2.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "cca12d76fa9758e1f9274b4bf7145f16",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 6109,
            "upload_time": "2022-08-06T07:25:46",
            "upload_time_iso_8601": "2022-08-06T07:25:46.132884Z",
            "url": "https://files.pythonhosted.org/packages/d8/85/770270038e177bf14b0961cea0fca12884a6fcf410362000d70e68fba57a/fies-1.2.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "da7b094a99c331acd81803e87f1befd6",
                "sha256": "9496bf8d6ba801a919b2762a88274b9d76f0c212f271fe42cc2f075e458c5d2f"
            },
            "downloads": -1,
            "filename": "fies-1.2.3.tar.gz",
            "has_sig": false,
            "md5_digest": "da7b094a99c331acd81803e87f1befd6",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 5069,
            "upload_time": "2022-08-06T07:25:50",
            "upload_time_iso_8601": "2022-08-06T07:25:50.604032Z",
            "url": "https://files.pythonhosted.org/packages/60/11/ec0059fec8b6f4edbfff52bd35b35bc6d00b45ed12f1fe0d161931d308d9/fies-1.2.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-08-06 07:25:50",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "fies"
}
        
Elapsed time: 0.63566s