
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.
Present ruby core data structures in a manner similar to perl's tie backed by a SQLite database. Intended to be as simple as possible, sacrificing performance and flexibility to do so.
It is not a 1:1 emulation of tie, as ruby cannot support this. What it does do is provide a convincing enough facsimile by emulating the interface, and making it easy to convert to native ruby types when that's not enough.
This library is completely unapologetic with regards to how little it does or how slow it does things.
All writes are fully consistent, which is something SQLite gives us. Reads always hit the database. This allows us to reason more clearly about how our data persists, even in concurrent models where shared state can get very complicated to use.
This was largely written to deal with problems I had to resolve in chef-workflow. If you like the idea but would like something more general or support for your favorite database, check out Moneta which is a little more geared towards having a flexible backend.
Here's an example for dealing with several collections.
require 'palsy'
# only one palsy instance exists in a given ruby process
Palsy.database = 'test.db'
# first arg is table name, second is object name.
# standard datatypes are aggressive indexed and constrained. just because we
# don't care about performance doesn't mean we ignore easy wins.
set_a = Palsy::Set.new('some_sets', 'set_a')
set_b = Palsy::Set.new('some_sets', 'set_b')
set_c = Palsy::Set.new('some_sets', 'set_c')
set_a.add('something')
set_b.add('something_else')
# they are nestable like you'd expect.
set_c.add(set_a)
# enumerable works with collections like you'd expect. the results however are
# not palsy objects, so you cannot expect persistence by transformating them.
# consequently, most bang methods will not work as you expect either.
set_a.group_by(&:length)
# they are not ruby 'Set' objects, they just act like them.
# to get at more esoteric methods you'll need to convert them to the proper
# ruby type.
#
# For example, Set theory operators on Palsy::Set are not first class, you need
# to convert to a ruby Set first. Casting to array, hash and set is something
# we try to support wherever possible.
#
# Below we get the union of set_a and set_b
set_a.to_set | set_b.to_set
Add this line to your application's Gemfile:
gem 'palsy'
And then execute:
$ bundle
Or install it yourself as:
$ gem install palsy
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)Changes to author, license or version information without prior approval will be rejected regardless of other changes.
Erik Hollensbe erik+github@hollensbe.org
FAQs
Unknown package
We found that palsy 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.