
Security News
Astral Launches pyx: A Python-Native Package Registry
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Comparisons and transformation between trees of files and JSON blobs
The "JSON blobs" that are supported are not unlimited in structure, but must define:
Add this line to your application's Gemfile:
gem 'treet'
And then execute:
$ bundle
Or install it yourself as:
$ gem install treet
treet expand [path] [jsonfile]
treet explode [jsonfile] [rootdir]
treet import [rootdir] [xrefkey]
require 'treet'
hash = Treet::Hash.new(jsonfile)
repo = Treet::Repo.new(directory)
farm = Treet::Farm.new(rootdir, :xref => 'label')
hash = repo.to_hash
repo = hash.to_repo(root)
hash = farm.export
Treet.init(jsonfile, root) # when jsonfile contains an array which is exploded to multiple files
A repo is a directory that contains other files & directories. Any text files in this tree structure must contain JSON-formatted data.
A farm is a directory containing one or more repos. When a farm is exported to JSON, each record is augmented with an xref value that contains the root filename of that repo.
For example:
farm = Treet::Farm.new(rootdir, :xref => 'keycode')
puts farm.export
should produce something like:
{
"subdir1": {
"field": "value"
},
"subdir2": {
"field": "value",
"field2": "value2"
},
"xref": {
"keycode": "repo-dir-name"
}
}
All the nodes at the top level are mapped to subdirectories.
At the second level, arrays elements are converted to individual subdirectories. Subdirectories are named with unique digest values computed from the data contents. This means that duplicate entries are not allowed.
git checkout -b my-new-feature
)git commit -am 'Added some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that treet demonstrated a not healthy version release cadence and project activity because the last version was released 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
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.
Security News
The latest Opengrep releases add Apex scanning, precision rule tuning, and performance gains for open source static code analysis.