A tool to easily read and write json files, pickle files, binary files and plain text files.
Project description
fies
下の方に日本語の説明があります
Overview
- A tool to easily read and write json files, pickle files, binary files and plain text files.
- It will be extended to csv format.
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
# Save binary file
fies["./test.bin", "binary"] = b"hoge"
# format-specified save
fies["./test.myext", "json"] = {"hoge": 23, "dummy_data": "fuga"}
概要
- jsonファイル, pickleファイル, バイナリファイル, プレーンテキストのファイルを簡単に読み書きできるツールです。
- csv形式にも拡張予定です。
使い方
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.bin", "binary"] = b"hoge"
# フォーマット指定書き出し
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.1.tar.gz
(3.7 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.1-py3-none-any.whl
(4.8 kB
view details)
File details
Details for the file fies-0.3.1.tar.gz.
File metadata
- Download URL: fies-0.3.1.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7b20c3ebaa0eec3b180fc1aeabf22d2a1ac4f47063280f30229550b0b8cad6ed
|
|
| MD5 |
fa5dc50cb5744dd80cfeca9076ea3c9e
|
|
| BLAKE2b-256 |
be91a3ce0d80c94f5c6dbaee99d4fc74c397ec06cc2a999358f0ecea2e54a020
|
File details
Details for the file fies-0.3.1-py3-none-any.whl.
File metadata
- Download URL: fies-0.3.1-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
057546192a53af22949d05641654f0a1f628fb0f665bd62cae379ebaf668d709
|
|
| MD5 |
c4b105b233f4fd0a0c65294a4200eaf2
|
|
| BLAKE2b-256 |
ce9abe32c4411a8633b569fa6c3f3e42779e5f082e1a6a7d81a65010d18cb55e
|