
Security News
PEP 810 Proposes Explicit Lazy Imports for Python 3.15
An opt-in lazy import keyword aims to speed up Python startups, especially CLIs, without the ecosystem-wide risks that sank PEP 690.
@fedify/botkit-sqlite
Advanced tools
This package is a SQLite-based repository implementation for BotKit.
It provides a production-ready data storage solution using the built-in
node:sqlite
module, offering better performance and reliability compared to
in-memory storage while maintaining compatibility with both Deno and Node.js
environments.
deno add jsr:@fedify/botkit-sqlite
npm add @fedify/botkit-sqlite
pnpm add @fedify/botkit-sqlite
yarn add @fedify/botkit-sqlite
The SqliteRepository
can be used as a drop-in replacement for other repository
implementations in BotKit:
import { createBot } from "@fedify/botkit";
import { SqliteRepository } from "@fedify/botkit-sqlite";
const bot = createBot({
username: "mybot",
name: "My Bot",
repository: new SqliteRepository({
// Use a file-based database for persistence:
path: "./bot-data.db",
// Enable WAL mode for better performance (default: true):
wal: true,
}),
// ... other bot configuration
});
The SqliteRepository
constructor accepts the following options:
path
(optional): Path to the SQLite database file. Defaults to
":memory:"
for an in-memory database. Use a file path for persistent
storage.
wal
(optional): Whether to enable write-ahead logging (WAL) mode for
better performance. Defaults to true
. Note that WAL mode is automatically
disabled for in-memory databases.
const repository = new SqliteRepository(); // Uses :memory: by default
const repository = new SqliteRepository({
path: "./data/botkit.db",
wal: true,
});
Cross-runtime: Works with both Deno and Node.js using the node:sqlite
module
High performance: Utilizes WAL mode and proper indexing for optimal performance
ACID compliance: Transactions ensure data integrity and consistency
Full Repository
API: Implements all BotKit repository methods
including:
Resource management: Implements Disposable
interface for proper cleanup
FAQs
SQLite-based repository for BotKit
The npm package @fedify/botkit-sqlite receives a total of 4 weekly downloads. As such, @fedify/botkit-sqlite popularity was classified as not popular.
We found that @fedify/botkit-sqlite 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
An opt-in lazy import keyword aims to speed up Python startups, especially CLIs, without the ecosystem-wide risks that sank PEP 690.
Security News
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.