Crimson LangGraph Development Tools
A lightweight library for LangGraph that provides useful shortcuts and additional utility functions.
Installation
pip install crimson-langgraph-dev-tool
Overview
This library provides a set of tools and examples to make working with LangGraph easier and more efficient. It includes utility functions for visualization and a collection of examples demonstrating common patterns and use cases.
Modules
crimson.langgraph_dev_tool.display
This module contains functions for visualizing LangGraph objects:
display_graph(graph): Renders a compiled state graph as a Mermaid diagram in Jupyter notebooks
Example usage:
from crimson.langgraph_dev_tool.display import display_graph
from langgraph.graph import StateGraph
# Create your graph
builder = StateGraph(State)
# Add nodes and edges
# ...
graph = builder.compile()
# Display the graph
display_graph(graph)
Examples
The repository includes several examples demonstrating the use of LangGraph in different scenarios:
Conditional Edge Examples
Located in example/langgraph/conditional_edge.ipynb
This example demonstrates how to use conditional edges in LangGraph to create dynamic branching logic based on state conditions. It covers:
- Basic conditional branching
- Using typed dictionaries for state management
- Creating functions that return a list of destinations
- Using
RunnableLambdawith conditional edges - Adding listeners for debugging and monitoring
Highlights:
- Using
route_charsfunction to conditionally route to multiple nodes - Demonstrating the differences between using a
Callablevs aRunnablefor path selection - Examples of advanced typehints and their usage in LangGraph
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Metadata
Release files for crimson-langgraph-dev-tool 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| crimson_langgraph_dev_tool-0.1.0.tar.gz | 3.4 kB | Without provenance | Details for crimson_langgraph_dev_tool-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| crimson_langgraph_dev_tool-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for crimson_langgraph_dev_tool-0.1.0-py3-none-any.whl |
Total release size: 7.2 kB
Release files / crimson_langgraph_dev_tool-0.1.0.tar.gz
| Download URL | crimson_langgraph_dev_tool-0.1.0.tar.gz |
|---|---|
| Size | 3.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c36347533d7e2ec0df09ae223cd9ba9946117e4054a25ef8d968ba0afb729aa1
|
|
BLAKE2b-256 checksum How to use checksums |
8b33d2f7a103aa68cfa2189ecb32c15283b573196a1bb3c1f3a7363ca0e39a6d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.16
|
Release files / crimson_langgraph_dev_tool-0.1.0-py3-none-any.whl
| Download URL | crimson_langgraph_dev_tool-0.1.0-py3-none-any.whl |
|---|---|
| Size | 3.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
27577531b629499a2242a366758f311ddbee6fd0442d255a823d062053bf27cf
|
|
BLAKE2b-256 checksum How to use checksums |
f8d3aaa9d0bef9ae8cd1979000b4592006dbdb85299e5ef775e07df4b5e99fa4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.16
|
Security for crimson-langgraph-dev-tool 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.