
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.
Document-like ORM based on Redis key value store - uses Redis Re-JSON for full json manipulation
Add to your gemfile:
gem 'redijson_models', '~> 0.8.1'
Or without bundler, run in your shell:
gem i redijson_models
Model.get 1 #=> returns an object instance (gets it from redis)
Model.all #=> returns an array of Model object instances
Model.create({}) #=> creates an entry in redis
Model.update(1, {}) #=> updates a record in redis
class Document
extend RediJsonModelLib
include RediJsonModelMixin
include Virtus.model
attribute :id, Integer
attribute :name, String
attribute :contents, String
def antani
# "..."
end
end
doc = Document.new name: "Foo", contents: "Bar123"
puts doc.name #=> "foo"
puts doc.antani #=> "..."
doc.save # saves the record, gives an auto increment id (example: 1)
doc = Document.get doc.id
puts doc.name #=> "foo"
puts doc.antani #=> "..."
in this repo run:
docker-compose up
Which use the docker-compose.yml to start your redis.
# sample environment setup
require 'bundler'
Bundler.require :default
# setup redis
R = Redis.new
# load and configure redis with rejson models
include RediJsonModels
RJ.configure redis: R
class Document
# ...
end
(you need to run a local redis + rejson service - explained above)
Run:
rake spec
Enjoy!
@makevoid
FAQs
Unknown package
We found that redijson_models 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.