Installation
Install from npm
npm install dbx-py
Install with yarn
yarn add dbx-py
Install with pnpm
pnpm add dbx-py
Requirements
- Node.js: 16.x or higher
- Platform: Windows x64 (currently tested)
- Linux x64: Planned
- macOS (Intel/Apple Silicon): Planned
Verify Installation
const { Database } = require('dbx-py');
const db = Database.openInMemory();
console.log('DBX Node.js loaded successfully!');
db.close();
TypeScript Setup
Install Type Definitions
Type definitions are included in the package.
tsconfig.json
{
"compilerOptions": {
"target": "ES2020",
"module": "commonjs",
"esModuleInterop": true,
"strict": true
}
}
Example
import { Database } from 'dbx-py';
const db: Database = Database.openInMemory();
db.insert('users', Buffer.from('user:1'), Buffer.from('Alice'));
db.close();
Troubleshooting
Module Not Found
Cause: Installation failed or wrong Node.js version
Solution:
# Check Node.js version
node --version # Should be 16+
# Reinstall
npm uninstall dbx-py
npm install dbx-py
Native Module Error on Windows
Cause: Missing Visual C++ Redistributable
Solution:
- Download Microsoft Visual C++ Redistributable
- Install and restart
Version Check
npm list dbx-py
Next Steps
- Quick Start - Get started in 5 minutes
- SQL Guide - SQL usage
- API Reference - Complete API