
Research
/Security News
Malicious npm Packages Target WhatsApp Developers with Remote Kill Switch
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.
A library for building and managing content blocks with standardized representation
A library for building and managing content blocks.
corelab-blockkit
is a CoreLab project that provides a standardized representation of course content as discrete "blocks" that can be serialized, rendered, and extended. It's designed to be lightweight, type-safe, and easily extensible.
pip install corelab-blockkit
from corelab_blockkit import BlockList, TextBlock, ImageBlock
# Create a block list
blocks = BlockList()
# Add a text block
text_block = TextBlock(
text="Hello **world**! This is a *markdown* formatted text block.",
format="markdown",
)
blocks = blocks.add(text_block)
# Add an image block
image_block = ImageBlock(
url="https://example.com/image.jpg",
alt_text="An example image",
caption="Figure 1: Example image",
)
blocks = blocks.add(image_block)
# Serialize to JSON
json_str = blocks.to_json(indent=2)
print(json_str)
# Serialize to YAML
yaml_str = blocks.to_yaml()
print(yaml_str)
# Deserialize from JSON
deserialized = BlockList.from_json(json_str)
You can extend blockkit
with custom block types by creating a plugin. Here's how:
BaseBlock
pyproject.toml
:[project.entry-points."blockkit.blocks"]
my_block = "my_package:MyBlock"
blockkit
will automatically discover and register your block typeSee the examples/plugin_example directory for a complete example.
Each block is serialized to JSON with the following structure:
{
"id": "uuid-string",
"kind": "block-type",
"meta": {
"created_at": "iso-datetime",
"updated_at": "iso-datetime",
"is_favorite": false,
"tags": [],
"extra": {}
},
"payload": {
// Block-specific content
}
}
A block list is serialized as:
{
"blocks": [
// Array of block objects
]
}
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
FAQs
A library for building and managing content blocks with standardized representation
We found that corelab-blockkit 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.
Research
/Security News
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.
Research
/Security News
Socket uncovered 11 malicious Go packages using obfuscated loaders to fetch and execute second-stage payloads via C2 domains.
Security News
TC39 advances 11 JavaScript proposals, with two moving to Stage 4, bringing better math, binary APIs, and more features one step closer to the ECMAScript spec.