Skip to content

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants