
Research
/Security News
Popular npm Packages in the keyv and Cacheable Namespaces Compromised in Active Supply Chain Attack
Popular npm packages keyv and cacheable compromised.
@deepnote/blocks
Advanced tools
The blocks package defines the Deepnote Blocks.
This package provides TypeScript types and utilities for working with Deepnote notebook blocks, including:
<hr>)import { createPythonCode } from "@deepnote/blocks";
// Code block
const codeBlock = {
type: "code",
content: 'print("Hello, world!")',
// ...
};
createPythonCode(codeBlock); // 'print("Hello, world!")'
// SQL block
const sqlBlock = {
type: "sql",
content: "SELECT * FROM users",
metadata: {
deepnote_variable_name: "df_users",
sql_integration_id: "abc-123",
},
// ...
};
createPythonCode(sqlBlock);
// df_users = _dntk.execute_sql('SELECT * FROM users', 'SQL_ABC_123', ...)
// Input checkbox
const checkboxBlock = {
type: "input-checkbox",
metadata: {
deepnote_variable_name: "is_enabled",
deepnote_variable_value: true,
},
// ...
};
createPythonCode(checkboxBlock); // is_enabled = True
// Input date range
const dateRangeBlock = {
type: "input-date-range",
metadata: {
deepnote_variable_name: "date_range",
deepnote_variable_value: "past7days",
},
// ...
};
createPythonCode(dateRangeBlock);
// from datetime import datetime as _deepnote_datetime, timedelta as _deepnote_timedelta
// date_range = [_deepnote_datetime.now().date() - _deepnote_timedelta(days=7), ...]
import { createMarkdown, stripMarkdown } from "@deepnote/blocks";
const headingBlock = {
type: "text-cell-h1",
content: "Main Title",
// ...
};
const markdown = createMarkdown(headingBlock); // "# Main Title"
const plainText = stripMarkdown(headingBlock); // "Main Title"
const todoBlock = {
type: "text-cell-todo",
content: "Complete task",
metadata: { checked: true },
// ...
};
createMarkdown(todoBlock); // "- [x] Complete task"
const separatorBlock = {
type: "separator",
content: "",
// ...
};
createMarkdown(separatorBlock); // "<hr>"
const imageBlock = {
type: "image",
content: "",
metadata: {
deepnote_img_src: "https://example.com/image.png",
deepnote_img_width: "500",
deepnote_img_alignment: "center",
},
// ...
};
createMarkdown(imageBlock); // '<img src="https://example.com/image.png" width="500" align="center" />'
FAQs
The blocks package defines the Deepnote Blocks.
The npm package @deepnote/blocks receives a total of 3,979 weekly downloads. As such, @deepnote/blocks popularity was classified as popular.
We found that @deepnote/blocks demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers 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.

Research
/Security News
Popular npm packages keyv and cacheable compromised.

Security News
A misconfiguration gave three Anthropic models internet access, and one, believing it was in a simulation, shipped a credential-stealing package to PyPI.

Security News
/Company News
Socket has joined the new Composer and Packagist sponsorship program as a launch sponsor, supporting the team that keeps PHP's package ecosystem secure.