Skip to content

[WIP] SQLiteにgraphを保存 #3

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

hangingman
Copy link
Owner

@hangingman hangingman commented Jan 15, 2025

やったこと

  • SQLiteのsimple-graph-sqliteでJSONを保存している

確認方法

サーバ起動

$ pip install -r requiements.txt

$ mkdir -p src/workspace/log
$ cd src/workspace

$ uvicorn server:app --host 0.0.0.0 --port 8000 --reload

グラフの保存と取得処理確認

# 1. グラフを保存                                                                                                                                                                           
$ response=$(curl -s -X POST -H "Content-Type: application/json" -d @tests/test_data/example.json http://localhost:8000/graph/testuser)                                                       
$ uuid=$(echo $response | jq -r '.uuid')                                                                                                                                                      
                                                                                                                                                                                             
# 2. 保存したグラフを取得                                                                                                                                                                   
$ curl http://localhost:8000/graph/testuser/$uuid | jq                                                                                                                                        
                                                                                                                                                                                             
# 3. グラフ一覧を取得                                                                                                                                                                       
$ curl http://localhost:8000/graphs/testuser | jq

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant