简体   繁体   中英

Pynamodb | Dynamodb

Hey i am pretty new to the pynamodb, i want to know how to use pre-existing table in pynamodb without re-writing the models defination.

from pynamodb.connection import Connection

# Get a connection
conn = Connection(host='http://localhost:8000')
# print(conn)

# List tables
print(conn.list_tables()['TableNames'])

so here i see the table names in my database but i can't use them, please help me how can i use the tables without defining models.

Thanks

okay so, PynamoDB's only advantage over using the native DynamoDB Python API is models. If you don't need models, consider using the native API. if there is already table created in the database then we have to use boto3 lib.

thanks

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM