Skip to content

Conversation

@BeautyyuYanli
Copy link
Contributor

@BeautyyuYanli BeautyyuYanli commented Dec 11, 2025

async def contextual_example():
    async with await NebulaAsyncClient.connect(
        hosts=["127.0.0.1:9669"],
        username="root",
        password="NebulaGraph01",
        session_pool_config=SessionPoolConfig(),
    ) as client:
        print("Connected to the server...")
        async with client.borrow() as session:
            await session.execute("SESSION SET GRAPH movie")
            res = await session.execute("MATCH (v:Movie) RETURN count(v)")
            res.print()

📚 Documentation preview 📚: https://nebulagraph-python--386.org.readthedocs.build/en/386/

@BeautyyuYanli BeautyyuYanli changed the title [Feature] Support borrow session on client [Feature] Support borrow session for contextual execution Dec 11, 2025
@BeautyyuYanli BeautyyuYanli merged commit f8fde4d into dev Dec 12, 2025
2 checks passed
@BeautyyuYanli BeautyyuYanli deleted the yanli/context_execute branch December 12, 2025 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants