frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: We built a type-safe Python ORM for RedisGraph/FalkorDB

5•hello-tmst•1w ago
We were tired of writing raw Cypher — escaping quotes, zero autocomplete, refactoring nightmares — so we built GraphORM: a type-safe Python ORM for RedisGraph/FalkorDB using pure Python objects.

What it does Instead of fragile Cypher:

    query = """
    MATCH (a:User {user_id: 1})-[r1:FRIEND]->(b:User)-[r2:FRIEND]->(c:User)
    WHERE c.user_id <> 1 AND b.active = true
    WITH b, count(r2) as friend_count
    WHERE friend_count > 5
    RETURN c, friend_count
    ORDER BY friend_count DESC
    LIMIT 10
    """
You write type-safe Python:

    stmt = select().match(
        (UserA, FRIEND.alias("r1"), UserB),
        (UserB, FRIEND.alias("r2"), UserC)
    ).where(
        (UserA.user_id == 1) & (UserC.user_id != 1) & (UserB.active == True)
    ).with_(
        UserB, count(FRIEND.alias("r2")).label("friend_count")
    ).where(
        count(FRIEND.alias("r2")) > 5
    ).returns(
        UserC, count(FRIEND.alias("r2")).label("friend_count")
    ).orderby(
        count(FRIEND.alias("r2")).desc()
    ).limit(10)
Key features: • Type-safe schema with Python type hints • Fluent query builder (select().match().where().returns()) • Automatic batching (flush(batch_size=1000)) • Atomic transactions (with graph.transaction(): ...) • Zero string escaping — O'Connor and "The Builder" just work

Target audience • AI/LLM agent devs: store long-term memory as graphs (User → Message → ToolCall) • Web crawler engineers: insert 10k pages + links in 12 lines vs 80 lines of Cypher • Social network builders: query "friends of friends" with indegree()/outdegree() • Data engineers: track lineage (Dataset → Transform → Output) • Python devs new to graphs: avoid Cypher learning curve

Data insertion: the real game-changer

Raw Cypher nightmare: queries = [ """CREATE (:User {email: "alice@example.com", name: "Alice O\\'Connor"})""", """CREATE (:User {email: "bob@example.com", name: "Bob \\"The Builder\\""})""" ] for q in queries: graph.query(q) # No transaction safety!

GraphORM bliss: alice = User(email="alice@example.com", name="Alice O'Connor") bob = User(email="bob@example.com", name='Bob "The Builder"') graph.add_node(alice) graph.add_edge(Follows(alice, bob, since=1704067200)) graph.flush() # One network call, atomic transaction

Try it in 30 seconds pip install graphorm

    from graphorm import Node, Edge, Graph

    class User(Node):
        __primary_key__ = ["email"]
        email: str
        name: str

    class Follows(Edge):
        since: int

    graph = Graph("social", host="localhost", port=6379)
    graph.create()
    alice = User(email="alice@example.com", name="Alice")
    bob = User(email="bob@example.com", name="Bob")
    graph.add_node(alice)
    graph.add_edge(Follows(alice, bob, since=1704067200))
    graph.flush()
GitHub: https://github.com/hello-tmst/graphorm

We'd love honest feedback: • Does this solve a real pain point for you? • What's missing for production use? • Any API design suggestions?

Comments

justinlords•1w ago
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.
hello-tmst•1w ago
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.

shahar_biron•1w ago
BTW, in falkordb we also developed an ORM library, also covering RBAC based security features. https://github.com/FalkorDB/falkordb-py-orm
hello-tmst•1w ago
Thanks for sharing these resources — great to see the FalkorDB ecosystem growing! We built GraphORM with a focus on type safety + fluent query composition (e.g., indegree()/outdegree() helpers, chainable .match().where().returns()), which we found missing in existing RedisGraph/FalkorDB Python tooling. Happy to see multiple approaches emerging — diversity helps the ecosystem. We're also planning to expand support beyond RedisGraph/FalkorDB to other Cypher-compatible databases where the query model fits. Would love to exchange ideas on ORM design patterns if you're open to it.
shahar_biron•1w ago
Sure, BTW as you might be aware, RedisGraph support was discontinued, so FalkorDB is maintained with more features and fully supports all RedisGraph features.
shahar_biron•1w ago
For other coding options, we added spring-data based similar library (Java users): https://github.com/FalkorDB/spring-data-falkordb And for Go developers: https://github.com/FalkorDB/falkordb-go-orm

Show HN: I built a RAG engine to search Singaporean laws

https://github.com/adityaprasad-sudo/Explore-Singapore
1•ambitious_potat•2m ago•0 comments

Scams, Fraud, and Fake Apps: How to Protect Your Money in a Mobile-First Economy

https://blog.afrowallet.co/en_GB/tiers-app/scams-fraud-and-fake-apps-in-africa
1•jonatask•2m ago•0 comments

Porting Doom to My WebAssembly VM

https://irreducible.io/blog/porting-doom-to-wasm/
1•irreducible•2m ago•0 comments

Cognitive Style and Visual Attention in Multimodal Museum Exhibitions

https://www.mdpi.com/2075-5309/15/16/2968
1•rbanffy•4m ago•0 comments

Full-Blown Cross-Assembler in a Bash Script

https://hackaday.com/2026/02/06/full-blown-cross-assembler-in-a-bash-script/
1•grajmanu•9m ago•0 comments

Logic Puzzles: Why the Liar Is the Helpful One

https://blog.szczepan.org/blog/knights-and-knaves/
1•wasabi991011•21m ago•0 comments

Optical Combs Help Radio Telescopes Work Together

https://hackaday.com/2026/02/03/optical-combs-help-radio-telescopes-work-together/
2•toomuchtodo•26m ago•1 comments

Show HN: Myanon – fast, deterministic MySQL dump anonymizer

https://github.com/ppomes/myanon
1•pierrepomes•32m ago•0 comments

The Tao of Programming

http://www.canonical.org/~kragen/tao-of-programming.html
1•alexjplant•33m ago•0 comments

Forcing Rust: How Big Tech Lobbied the Government into a Language Mandate

https://medium.com/@ognian.milanov/forcing-rust-how-big-tech-lobbied-the-government-into-a-langua...
1•akagusu•33m ago•0 comments

PanelBench: We evaluated Cursor's Visual Editor on 89 test cases. 43 fail

https://www.tryinspector.com/blog/code-first-design-tools
2•quentinrl•35m ago•2 comments

Can You Draw Every Flag in PowerPoint? (Part 2) [video]

https://www.youtube.com/watch?v=BztF7MODsKI
1•fgclue•40m ago•0 comments

Show HN: MCP-baepsae – MCP server for iOS Simulator automation

https://github.com/oozoofrog/mcp-baepsae
1•oozoofrog•44m ago•0 comments

Make Trust Irrelevant: A Gamer's Take on Agentic AI Safety

https://github.com/Deso-PK/make-trust-irrelevant
3•DesoPK•48m ago•0 comments

Show HN: Sem – Semantic diffs and patches for Git

https://ataraxy-labs.github.io/sem/
1•rs545837•49m ago•1 comments

Hello world does not compile

https://github.com/anthropics/claudes-c-compiler/issues/1
33•mfiguiere•55m ago•18 comments

Show HN: ZigZag – A Bubble Tea-Inspired TUI Framework for Zig

https://github.com/meszmate/zigzag
3•meszmate•57m ago•0 comments

Metaphor+Metonymy: "To love that well which thou must leave ere long"(Sonnet73)

https://www.huckgutman.com/blog-1/shakespeare-sonnet-73
1•gsf_emergency_6•59m ago•0 comments

Show HN: Django N+1 Queries Checker

https://github.com/richardhapb/django-check
1•richardhapb•1h ago•1 comments

Emacs-tramp-RPC: High-performance TRAMP back end using JSON-RPC instead of shell

https://github.com/ArthurHeymans/emacs-tramp-rpc
1•todsacerdoti•1h ago•0 comments

Protocol Validation with Affine MPST in Rust

https://hibanaworks.dev
1•o8vm•1h ago•1 comments

Female Asian Elephant Calf Born at the Smithsonian National Zoo

https://www.si.edu/newsdesk/releases/female-asian-elephant-calf-born-smithsonians-national-zoo-an...
4•gmays•1h ago•0 comments

Show HN: Zest – A hands-on simulator for Staff+ system design scenarios

https://staff-engineering-simulator-880284904082.us-west1.run.app/
1•chanip0114•1h ago•1 comments

Show HN: DeSync – Decentralized Economic Realm with Blockchain-Based Governance

https://github.com/MelzLabs/DeSync
1•0xUnavailable•1h ago•0 comments

Automatic Programming Returns

https://cyber-omelette.com/posts/the-abstraction-rises.html
1•benrules2•1h ago•1 comments

Why Are There Still So Many Jobs? The History and Future of Workplace Automation [pdf]

https://economics.mit.edu/sites/default/files/inline-files/Why%20Are%20there%20Still%20So%20Many%...
2•oidar•1h ago•0 comments

The Search Engine Map

https://www.searchenginemap.com
1•cratermoon•1h ago•0 comments

Show HN: Souls.directory – SOUL.md templates for AI agent personalities

https://souls.directory
1•thedaviddias•1h ago•0 comments

Real-Time ETL for Enterprise-Grade Data Integration

https://tabsdata.com
1•teleforce•1h ago•0 comments

Economics Puzzle Leads to a New Understanding of a Fundamental Law of Physics

https://www.caltech.edu/about/news/economics-puzzle-leads-to-a-new-understanding-of-a-fundamental...
3•geox•1h ago•1 comments