
Security News
Django Joins curl in Pushing Back on AI Slop Security Reports
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
A tool to easily read and write json files, pickle files, binary files, csv files and plain text files.
下の方に日本語の説明があります
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]}}
# Checking if a file exists
print("test.pickle" in fies) # -> True
print("hoge.txt" in fies["input_dir"]) # -> True
# delete file
del fies["input_dir"]["hoge.txt"]
# Save binary file
fies["./test.bin", "binary"] = b"hoge"
# format-specified save
fies["./test.myext", "json"] = {"hoge": 23, "dummy_data": "fuga"}
# Recursive Enumeration of Files (Returns a list of absolute paths)
print(fies["./input_dir/"].all())
print(fies["./input_dir/"].rec()) # This notation works the same as above
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]}}
# ファイルの存在確認
print("test.pickle" in fies) # -> True
print("hoge.txt" in fies["input_dir"]) # -> True
# ファイルの削除
del fies["input_dir"]["hoge.txt"]
# バイナリファイル書き出し
fies["./test.bin", "binary"] = b"hoge"
# フォーマット指定書き出し
fies["./test.myext", "json"] = {"hoge": 23, "dummy_data": "fuga"}
# ファイルの再帰的列挙 (絶対パスのリストが返る)
print(fies["./input_dir/"].all())
print(fies["./input_dir/"].rec()) # この書き方でも上記と同様
FAQs
A tool to easily read and write json files, pickle files, binary files, csv files and plain text files.
We found that fies demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.