Notebooks
N
Neode
01 Getting Started

01 Getting Started

neode-notebookstutorials

🚀 Getting Started with Neode SDK

Open in Alph

This cookbook covers the basics of setting up and using the Neode Python SDK for knowledge graph operations.

What You'll Learn

  • Installing the SDK
  • Authenticating with your API key
  • Creating your first triples
  • Querying your knowledge graph

Prerequisites

Installation

Install the Neode SDK using pip:

[1]
Note: you may need to restart the kernel to use updated packages.

Authentication

Create a .env file in your project root with your API key:

NEODE_API_KEY=your-api-key-here

Or copy env.example to .env and fill in your key.

[ ]

Creating Your First Triples

Triples are the fundamental unit of knowledge in Neode. Each triple consists of:

  • Subject: The entity you're describing
  • Predicate: The relationship or property
  • Object: The value or related entity
[2]
✅ Triple created!
Created 1 triple(s)
[3]
✅ Created 6 triples!

Querying Your Knowledge Graph

Retrieve triples from your knowledge graph:

[4]
📊 Your Knowledge Graph:
------------------------------------------------------------
  Python → paradigm → object-oriented
  Guido van Rossum → is_a → software_engineer
  Python → paradigm → functional
  Guido van Rossum → nationality → Dutch
  Python → released_in → 1991
  Python → created_by → Guido van Rossum
  Python → is_a → programming_language
  JavaScript → is_a → programming_language
  JavaScript → is_a → programming_language
  JavaScript → is_a → programming_language
------------------------------------------------------------
Total triples returned: 10

Using Context Manager (Recommended)

For production code, use the context manager to ensure proper resource cleanup:

[5]
Found 5 triples

Next Steps

Now that you're set up, explore:

  • 02_working_with_triples.ipynb - CRUD operations on triples
  • 03_semantic_search.ipynb - Natural language queries
  • 04_ai_triple_generation.ipynb - Generate triples from text
  • 05_graphs_and_entities.ipynb - Manage graphs and entities