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`.
Metadata
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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| filee-0.0.5.tar.gz | 4.1 kB | Without provenance | Details for filee-0.0.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| filee-0.0.5-py3-none-any.whl | Python 3 | none | any | Details for filee-0.0.5-py3-none-any.whl |
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
|
Security for filee 0.0.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.