Adding describe table end point
This commit is contained in:
parent
25734f0c85
commit
7e3aa7c8ee
4 changed files with 99 additions and 3 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import re
|
||||
import json
|
||||
|
||||
from .models import dynamodb_backend
|
||||
|
||||
|
||||
|
|
@ -28,6 +29,11 @@ class DynamoHandler(object):
|
|||
response = {"TableNames": tables}
|
||||
return json.dumps(response)
|
||||
|
||||
def DescribeTable(self, uri, body, headers):
|
||||
name = json.loads(body)['TableName']
|
||||
table = dynamodb_backend.tables[name]
|
||||
return json.dumps(table.describe)
|
||||
|
||||
|
||||
def handler(uri, body, headers):
|
||||
return DynamoHandler(uri, body, headers).dispatch()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue