Python bindings for UCP (Unified Content Protocol) - Rust implementation
Project description
UCP - Unified Content Protocol
Python bindings for the Rust UCP implementation.
Installation
pip install ucp-content
Usage
import ucp
# Create a document
doc = ucp.create("My Document")
# Add blocks
root = doc.root_id
block1 = doc.add_block(root, "Hello, World!", role="paragraph")
# Edit blocks
doc.edit_block(block1, "Updated content")
# Render to markdown
md = ucp.render(doc)
print(md)
Features
- Document Operations: Create, edit, move, delete blocks
- Traversal: Children, parent, ancestors, descendants, siblings
- Finding: By tag, label, role, content type
- Edges: Create relationships between blocks
- LLM Utilities: IdMapper for token-efficient prompts, PromptBuilder for UCL generation
- Snapshots: Version control for documents
- UCL Execution: Execute UCL commands on documents
API Reference
See the documentation for full API reference.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ucp_core-0.1.5-cp312-cp312-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: ucp_core-0.1.5-cp312-cp312-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 1.5 MB
- Tags: CPython 3.12, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f4fcbdcdcf930f5ee0631b96aadf1c31330816c633a620463e04c4df2e47f36d
|
|
| MD5 |
a0ec96dd87715a4fedddeafb68ac39a0
|
|
| BLAKE2b-256 |
09299e001d68e37ae563e741b44e2471bc34eecf81dba1b2e00ddf0a4011b08f
|