Metadata-Version: 2.4
Name: layer-context
Version: 0.1.2
Summary: Context Layer SDK - versioned context infrastructure for AI apps
License: MIT
Project-URL: Homepage, https://get-context-layer.lovable.app
Project-URL: Documentation, https://get-context-layer.lovable.app/docs
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.28.0
Dynamic: license-file

# Context Layer

Python SDK for [ContextLayer](https://get-context-layer.lovable.app) — versioned context infrastructure for AI apps.

## Installation

```bash
pip install layer-context
```

## Quick Start

```python
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
