denosaurs / denosaurs/deno_python

Trouble with coroutines

Open
#74 0 comments 0 reactions 0 assignees View on GitHub
needs investigation
Dominant language
TypeScript
Stars
762
Forks
26
PR merge metrics
No merged PRs in 30d

Description

I'm using [this Python library ](https://github.com/getzep/graphiti?tab=readme-ov-file#quick-start) and it suggests that a minimal use looks _something like_ this:
```python
from graphiti_core import Graphiti

graphiti = Graphiti("bolt://localhost:7687", "neo4j", "password")

results = await graphiti.search('Who was the California Attorney General?')
```

Here's what I'm doing:
```typescript
import { python } from "@denosaurs/python";

const { Graphiti } = await python.import("graphiti_core");

const graphiti = await Graphiti(
GRAPH_DATABASE_URL,
GRAPH_DATABASE_USER,
GRAPH_DATABASE_PASS,
);

const search = async (query: string) => {
const result = await graphiti.search(query);
console.debug(result);
};

await search("Test search");
```
As I understand it this should be functionally equivalent, but the result of search is `` - it seems like using await is not properly resolving the coroutine.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.