Context Layer SDK - versioned context infrastructure for AI apps
Project description
Context Layer
Python SDK for ContextLayer — versioned context infrastructure for AI apps.
Installation
pip install layer-context
Quick Start
from layer_context import CL
cl = CL(api_key="cl_sk_your_key_here")
# Create a block
cl.create_block("support_faq")
# Append context
cl.append("support_faq", "How do I reset my password? Go to settings > security.")
cl.append("support_faq", "How do I change my email? Go to settings > account.")
# Get compiled context
context = cl.get("support_faq")
print(context)
# Update (replaces all context)
cl.update("support_faq", "Complete new FAQ content here...")
# Delete specific content
cl.delete("support_faq", "Some text to remove")
# Create a new version
cl.create_version("support_faq")
# Work with specific versions
cl.append("support_faq", "V2 content", version=2)
context_v2 = cl.get("support_faq", version=2)
# View history
entries = cl.history("support_faq")
# List all blocks
blocks = cl.list_blocks()
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
layer_context-0.1.2.tar.gz
(4.1 kB
view details)
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 layer_context-0.1.2.tar.gz.
File metadata
- Download URL: layer_context-0.1.2.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a9b44f1343db41b427ba84e2ad0930d3eb0d6ed63fa0abe44364f2265b93206b
|
|
| MD5 |
d366693db9151981027a81cd3a3657ab
|
|
| BLAKE2b-256 |
e07135277f53f87e9cedabdf367f2122a7c7208b7c92ae9a11814b105db64c25
|
File details
Details for the file layer_context-0.1.2-py3-none-any.whl.
File metadata
- Download URL: layer_context-0.1.2-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
131af390ed8ed0d255850852522f3827378293055c6f85c9d598eb31818aa387
|
|
| MD5 |
8bfea480c6a066874a54b5af48f88343
|
|
| BLAKE2b-256 |
e23bf6ad3296ba1d2b0e65b9d6d0e35f70c9aa4f550231fbef176a4407df1e23
|