Skip to main content
# filee

A command to save/load files from/to JSON.

```bash
$ filee load | python -m json.tool
{
"children": [
{
"name": "README.md",
"content": "# filee\n\nREADME\n",
"too_big": false,
"binary": false,
"read_only": false,
"changed": true,
"children": null
}
],
"name": "",
"content": null,
"too_big": false,
"binary": false,
"read_only": false,
"changed": true
}
```

## File tree JSON format

### Files

```json
{
"name": "README.md",
"content": "# filee\n\nREADME\n",
"too_big": false,
"binary": false,
"read_only": false,
"changed": true,
"children": null
}
```

The content will be encoded by `FTREE_ENCODING`.
If files are binary file, they will be encoded by BASE64.

### Directory

```json
{
"children": [
{ },
{ }
],
"name": "dirname",
"content": null,
"too_big": false,
"binary": false,
"read_only": false,
"changed": true
}
```

The `name` of root directory will be empty string (`''`).

## Load Command

`load` command loads data from file system and send it to the stdout as JSON.
The JSON will be formed as above file tree format.

```bash
$ filee load
```

* `--dir`: Target directory to load. default is current directory.
* `--etag`: Load only changed files.

### Etag behavior

By usinig `--etag` option, the command will return only changed files.
It will save hashes of each files in `FTREE_LOAD_FILE_HASHES` setting path,
and recognize files are changed from last loading or not.

```json
{
"name": "README.md",
"content": null,
"too_big": false,
"binary": false,
"read_only": false,
"changed": false,
"children": null
}
```

This option can reduce the size of JSON output.

## Save Command

`save` command accepts JSON input from stdin, and saves files to your file system.
The JSON should be formed as above file tree format.

```bash
$ filee save
```

## Settings

You can specify settings for filee command by environment variables:

* `FTREE_ENCODING`: Save/Load encoding. default is `"utf-8"`
* `FTREE_MAX_SIZE`: Max file size (bytes) to load. default is 1MB.
* `FTREE_MAX_CHILDREN`Max number of children of directories. default is 50.
* `FTREE_MAX_DEPTH`: Max number of depth of directory tree. default is 20.
* `FTREE_LOAD_FILE_HASHES`: File path to save hashes of loading. default is `~/.fileeloadhashes`.

Release files for filee 0.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for filee 0.0.5
File Size Uploaded
filee-0.0.5.tar.gz 4.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for filee 0.0.5
File Interpreter ABI Platform
filee-0.0.5-py3-none-any.whl Python 3 none any Details

Total release size: 10.3 kB

Release files / filee-0.0.5.tar.gz

Download URL filee-0.0.5.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
3eb40725a9f7cb9292e07a29f8462cd528a8a68f26e3194807ed5e5a57883bdb
BLAKE2b-256 checksum
How to use checksums
7228010be1829b432c58ec229d640b16e7fc47314564b3d68fd60652a0940d1d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/3.7

Release files / filee-0.0.5-py3-none-any.whl

Download URL filee-0.0.5-py3-none-any.whl
Size 6.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cf92f91a6c56a863a115394af322268448c70af966381e33b5c9b66beb47aebd
BLAKE2b-256 checksum
How to use checksums
b70b52487cf35ff364716b32d09fd5f3fbb4d9e83c53cc629367bd197920b152
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/3.7

Release history Release notifications | RSS feed

This release

0.0.5 This release

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page