A tool to easily read and write json files and plain text files.
Project description
fies
下の方に日本語の説明があります
Overview
- A tool to easily read and write json files and plain text files.
- It will be extended to other formats. (csv, pickle, binary, etc.)
Usage
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]
Advanced usage
# format-specified save
fies["./test.myext", "json"] = {"hoge": 23, "dummy_data": "fuga"}
概要
- jsonファイル, プレーンテキストのファイルを簡単に読み書きできるツールです。
- 他の形式にも拡張予定です。(csv, pickle, バイナリ など)
使い方
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]
発展的な使い方
# フォーマット指定書き出し
fies["./test.myext", "json"] = {"hoge": 23, "dummy_data": "fuga"}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
fies-0.3.0.tar.gz
(3.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
fies-0.3.0-py3-none-any.whl
(4.7 kB
view details)
File details
Details for the file fies-0.3.0.tar.gz.
File metadata
- Download URL: fies-0.3.0.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.5.0.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.6.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
16e8ac65a2a8e56a6ee0c30edc64a63bf9af2ab9cf6cace473b1d59907294166
|
|
| MD5 |
42c72d4ab863a5d515b66ef959796884
|
|
| BLAKE2b-256 |
961c6cb61dc5b10b050cc6ff39bd717a8e0803460d1fe311f2f866d780bde289
|
File details
Details for the file fies-0.3.0-py3-none-any.whl.
File metadata
- Download URL: fies-0.3.0-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.5.0.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.6.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0755918c84c8964b98dc9485bfc5180653523ba52865c7f2bb56f805d3b7a9c3
|
|
| MD5 |
93271ff58300dbab41c749e0b2fdf772
|
|
| BLAKE2b-256 |
7b1f1bb0b0ebac0709d34987774712d0c1f7e403de7a5bb59bad5aab490a37b3
|