Registry / azure / langchain-azure-dynamic-sessions

langchain-azure-dynamic-sessions

JSON →
library1.0.2pypypi✓ verified 80d ago

An integration package connecting Azure Container Apps dynamic sessions with LangChain. It provides tools to execute code snippets (Python, bash) in isolated, ephemeral sessions within Azure Container Apps. Current version 1.0.2, released on 2025-01-14, with periodic patch updates. Requires Python >=3.10, <4.0.

pip install langchain-azure-dynamic-sessions
INSTALL
IMPORT
SIG · LANGCHAIN-AZURE-DY
L
langchain-azure-dynamic-sessions
azurepythonv1.0.2
Install
8.2s avg
Import
Disk
90MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.0.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 86.3MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 8.2s · import 0.000s · 95MB
90MB installed
● package 90MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

SessionsBashTool
from langchain_azure_dynamic_sessions import SessionsBashTool
from langchain_azure_dynamic_sessions.tool import AzureDynamicSessionsTool
SessionsPythonREPLTool
from langchain_azure_dynamic_sessions import SessionsPythonREPLTool
tools
from langchain_azure_dynamic_sessions import tools

Initialize the tool with your pool endpoint (set the environment variable or replace the placeholder) and execute a Python snippet.

import os from langchain_azure_dynamic_sessions.tool import AzureDynamicSessionsTool pool_endpoint = os.environ.get("AZURE_CONTAINER_SESSION_POOL_ENDPOINT", "https://<your-pool>.region.azurecontainerapps.io") tool = AzureDynamicSessionsTool(pool_endpoint=pool_endpoint) result = tool.run("print('Hello from dynamic sessions!')") print(result)
Debug
Known issues
gotchaThe library requires Python >=3.10. Attempting to install on older versions will fail due to requires_python constraints.
fix
Upgrade to Python 3.10+ or use a compatible environment.
affects: <1.0.0
breakingThe pool_endpoint must be a full URL (including https://). Earlier beta versions allowed just the pool name.
fix
Always use the full endpoint URL: https://<pool-name>.<region>.azurecontainerapps.io
affects: <1.0.0
gotchaAuthentication is handled via Azure Identity (DefaultAzureCredential). If you have multiple credentials, ensure the correct one is used (e.g., via environment variables).
fix
Set AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET, or use Azure CLI login.
affects: *
deprecatedThe SessionsPythonTool is deprecated in favor of AzureDynamicSessionsTool. New projects should use AzureDynamicSessionsTool.
fix
Replace SessionsPythonTool with AzureDynamicSessionsTool.
affects: >=1.0.0
Upgrade
Version history
1.0.2latest on PyPI · released Apr 15, 2026
Audit
Dependencies
langchain-corerequiredCore LangChain abstractions for tools, chains, etc.
Agent activity
26 hits · last 30 days
node
24
OpenAI (training)
1
Resources
langchain-azure-dynamic-sessions — pip install langchain-azure-dynamic-sessions · libregistry