# Gedis
An in-memory, Redis-like datastore for Godot.
[](https://discord.gg/Rx9CZX4sjG) [](https://mastodon.gamedev.place/@krazyjakee) [](https://www.youtube.com/@GodotNodot) [](https://github.com/sponsors/krazyjakee) [](https://github.com/NodotProject/Gedis)  ## Table of Contents - [Overview](#overview) - [Features](#features) - [Built with Gedis](#built-with-gedis) - [Installation](#installation) - [Contribution Instructions](#contribution-instructions) - [License](#license) ## Overview Gedis is a high-performance, in-memory key-value datastore for Godot projects, inspired by Redis. It provides a rich set of data structures and commands. Simply create an instance with `var gedis = Gedis.new()` and start using it: `gedis.set_value("score", 10)`. [](https://www.youtube.com/watch?v=tjiwAmH2-mE) **Redis-like? What the heck is Redis?** - See [Redis in 100 Seconds](https://www.youtube.com/watch?v=G1rOthIU-uo). ## Features - **Variants**: Basic key-value storage (`set_value`, `get_value`, `incr`, `decr`, `mget`, `mset`). - **Hashes**: Store object-like structures with fields and values (`hset`, `hget`, `hgetall`, `hmget`, `hmset`, `hexists`). - **Lists**: Ordered collections of strings, useful for queues and stacks (`lpush`, `rpush`, `lpop`, `blpop`, `ltrim`, `lexists`). - **Sets**: Unordered collections of unique strings (`sadd`, `srem`, `smembers`, `sunion`, `sinter`, `sexists`). - **Sorted Sets**: Ordered collections of unique strings where each member has an associated score (`zadd`, `zrem`, `zrange`, `zscore`, `zrank`, `zexists`, `zcard`). - **Existence Checks**: Convenient methods to check if specific data structure types exist (`lexists`, `sexists`, `zexists`, `hexists`). - **Key Expiry**: Set a time-to-live (TTL) on keys for automatic deletion (`expire`, `ttl`). - **Pub/Sub**: A powerful publish-subscribe system for real-time messaging between different parts of your game (`publish`, `subscribe`). ## Built with Gedis - **[GedisQueue](https://github.com/NodotProject/GedisQueue)** - A powerful and flexible job queue system for Godot, built on top of Gedis ## Installation ### From AssetLib You can install Gedis directly from the Godot Asset Library: Gedis Then, enable the plugin in **Project -> Project Settings -> Plugins**. ### Manual Installation 1. Copy the entire `addons/Gedis` folder into your Godot project's `addons` directory. 2. In Godot, go to **Project -> Project Settings -> Plugins** and enable the "Gedis" plugin. 3. The plugin will register an autoloaded singleton named `Gedis`, which is now available globally in your scripts. ## Contribution Instructions This addon is implemented in GDScript and does not require native compilation. To work on or test the addon, follow these steps: 1. **Clone the repository**: ```sh git clone --recursive https://github.com/NodotProject/Gedis.git cd Gedis ``` 2. **Develop & Test**: - The addon code lives under `addons/Gedis`. Copy that folder into your Godot project's `addons` directory to test changes. - Run the project's test suite with `./run_tests.sh`. 3. **Contribute**: Create a branch, make your changes, and open a pull request describing the work. ## đź’– Support Me Hi! I’m krazyjakee 🎮, creator and maintainÂer of the *NodotProject* - a suite of open‑source Godot tools (e.g. Nodot, Gedis, GedisQueue etc) that empower game developers to build faster and maintain cleaner code. I’m looking for sponsors to help sustain and grow the project: more dev time, better docs, more features, and deeper community support. Your support means more stable, polished tools used by indie makers and studios alike. [](https://ko-fi.com/krazyjakee) Every contribution helps maintain and improve this project. And encourage me to make more projects like this! *This is optional support. The tool remains free and open-source regardless.* --- **Created with ❤️ for Godot Developers** For contributions, please open issues on GitHub ## License MIT — see LICENSE for details.