Skip to content

Instantly share code, notes, and snippets.

@HardMax71
HardMax71 / conftest.py
Created March 11, 2025 12:03
Pydantic model <-> neomodel OGM (neo4j) <-> python dict converter
# ./tests/conftest.py
import pytest
from neomodel import config, db
from converter import Converter
@pytest.fixture(scope="session")
def db_connection():
"""Setup Neo4j database connection for all tests"""
@HardMax71
HardMax71 / gist:80ce18430713a1a5af3410d8daf19050
Last active September 11, 2024 14:09
Raw sql vs. sqlalchemy 2.0, using SQLite as DB
"""
Python 3.11.9, Win11, i5-10300H
Entries: 1000
Queries: 100
Results (in seconds):
Op SQLAlchemy Raw SQL Diff
--------------------------------------------------
Select 0.3067 0.0420 7.30