Re:Show HN: We built a type-safe Python ORM for RedisGraph/F...
by justinlords on Wednesday January 28, 2026 @11:29AM
(#46797551)
This looks solid, the type safety and automatic escaping alone would've saved me hours debugging Cypher strings. The batching is smart too. Curious how it handles variable-length paths though, since that's where most ORMs get messy. The AI agent memory use case makes a lot of sense.
[ Parent
| on HN ]
Re:Show HN: We built a type-safe Python ORM for RedisGraph/F...
by hello-tmst on Thursday January 29, 2026 @02:51AM
(#46807074)
Great question — variable-length paths are fully supported in the query builder:
# Friends of friends (1 to 3 hops)
stmt = select().match(
(User.alias("a"), FRIEND.variable_length(1, 3), User.alias("b"))
).where(
User.alias("a").user_id == 1
).returns(
User.alias("b")
)
Generates: `(a)-[:FRIEND1..3]->(b)`*Variants:* - Unbounded: `FRIEND.variable_length()` → `` - Exact length: `FRIEND.variable_length(2, 2)` → `2` - Min only: `FRIEND.variable_length(1)` → `1..` - Range: `FRIEND.variable_length(1, 3)` → `*1..3`
You can also use the explicit `VariableLength(FRIEND, 1, 3)` constructor if you need to alias the path or reference it later in the query.
The builder handles all edge cases (empty paths, cycles) the same way RedisGraph does — we compile to idiomatic Cypher without abstraction leaks. Raw string patterns still work if you need something exotic.