
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.
deepbase-mongo
Advanced tools
⚡ Fastest and simplest way to add Mongo persistence to your projects.
DeepBaseMongo is an innovative and efficient module designed to seamlessly integrate with MongoDB, providing a robust solution for managing and interacting with databases. With DeepBaseMongo, you can effortlessly perform CRUD operations and manipulate data stored in MongoDB collections.
For simplicity you may be interested in the version of DeepBase that persists in JSON files. https://www.npmjs.com/package/deepbase
# DeepBaseMongo requires MongoDB.
docker run -d -p 27017:27017 --name mongodb -d mongodb/mongodb-community-server:8.0-ubi8
npm install deepbase-mongo
const DeepBase = require("deepbase-mongo");
const mem = new DeepBase({ name: "db" }); // "db" mongo document
await mem.connect();
await mem.set("config", "lang", "en");
const configLang = await mem.get("config", "lang");
console.log(configLang); // "en"
const path = await mem.add("user", { name: "martin" });
// add() will create a secure key (ie. "iKid4OCK")
console.log(path) // [ 'user', 'iKid4OCK' ]
const userName = await mem.get(...path, "name");
console.log(userName); // "martin"
await mem.inc(...path, "balance", 160);
await mem.inc(...path, "balance", 420);
const userBalance = await mem.get(...path, "balance");
console.log(userBalance); // 580
await mem.upd("config", "lang", v => v.toUpperCase());
const lang = await mem.get("config", "lang"); // EN
await mem.add("user", { name: "anya" });
const userIds = await mem.keys("user")
console.log(userIds) // [ 'iKid4OCKds', 'F3wORv_Jsd' ]
console.log(await mem.get())
// {
// config: { lang: 'EN' },
// user: {
// iKid4OCKds: { name: 'martin', balance: 580 },
// F3wORv_Jsd: { name: 'anya' }
// }
// }
Contributions to DeepBase are welcome! If you have an idea or a bug to report, please open an issue. If you would like to contribute to the code, please open a pull request.
DeepBaseMongo is built with efficiency and performance in mind, leveraging the power of the MongoDB driver and optimizing data access operations. Whether you're building a small-scale application or a complex system, DeepBaseMongo empowers you to interact with MongoDB effortlessly, making your development process smoother and more efficient.
🚀 Try DeepBaseMongo today and experience the convenience and power it brings to your MongoDB data management workflow!
The MIT License (MIT)
Copyright (c) Martin Clasen
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FAQs
⚡ Fastest and simplest way to add Mongo persistence to your projects.
The npm package deepbase-mongo receives a total of 0 weekly downloads. As such, deepbase-mongo popularity was classified as not popular.
We found that deepbase-mongo demonstrated a healthy version release cadence and project activity because the last version was released less than 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.