Skip to main content
Glama

Neo4j Knowledge Graph

by mjftw
conftest.py721 B
import pytest from typing import AsyncGenerator from neo4j import AsyncDriver, AsyncGraphDatabase @pytest.fixture async def driver() -> AsyncGenerator[AsyncDriver, None]: """Common fixture providing a Neo4j driver for all integration tests""" driver = AsyncGraphDatabase.driver( "bolt://localhost:7687", auth=("neo4j", "password") ) try: await driver.verify_connectivity() yield driver finally: await driver.close() @pytest.fixture(autouse=True) async def clean_database(driver: AsyncDriver): """Automatically clean the database before each test""" async with driver.session() as session: await session.run("MATCH (n) DETACH DELETE n")

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mjftw/mcp_neo4j_knowledge_graph'

If you have feedback or need assistance with the MCP directory API, please join our Discord server