Bug in documentation
See original GitHub issueThe example in the documentation contains this:
app.config['DYNAMO_TABLES'] = [
{
TableName='users',
KeySchema=[dict(AttributeName='username', KeyType='HASH')],
AttributeDefinitions=[dict(AttributeName='username', AttributeType='S')],
ProvisionedThroughput=dict(ReadCapacityUnits=5, WriteCapacityUnits=5)
}, {
TableName='groups',
KeySchema=[dict(AttributeName='name', KeyType='HASH')],
AttributeDefinitions=[dict(AttributeName='name', AttributeType='S')],
ProvisionedThroughput=dict(ReadCapacityUnits=5, WriteCapacityUnits=5)
}
]
Which is invalid syntax, because the keys in the dict are not quoted. A quick fix is to change the braces to dict( ... )
Also, the example endpoint:
@app.route('/create_user')
def create_user():
dynamo.tables['users'].put_item(data={
'username': 'rdegges',
'first_name': 'Randall',
'last_name': 'Degges',
'email': 'r@rdegges.com',
})
…does not work, because the parameter for put_item()
should be Item
instead of data
, and the view should return some valid response instead of None
, for example return ""
, or better jsonify the value returned by put_item()
.
Although simple to fix, I find these issues worrying, because they are at least 2 years old, and apparently nobody noticed them yet. Is the library maintained?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:8
Top Results From Across the Web
Documentation bugs
Bug triaging is the process of reviewing new bugs, verifying whether a bug is valid or not, and gathering more information about it....
Read more >How to Write A Good Bug Report? Tips and Tricks
Use the following simple Bug report template: · Reporter: Your name and email address. · Product: In which product you found this bug....
Read more >Common word bugs in software documentation and how to fix ...
Common word bugs in software documentation and how to fix them · Use Correct Words · Go forth and write docs.
Read more >How to write an Effective Bug Report | BrowserStack
1. Title/Bug ID · 2. Environment · 3. Steps to Reproduce a Bug · 4. Expected Result · 5. Actual Result · 6....
Read more >Reporting Documentation Bugs - MariaDB Knowledge Base
This page contains general guidelines for the community for reporting documentation bugs. Known Bugs. First, check that the bug isn't already filed in...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@edusantana Yes, of course:
⚠️ For app factory approach users there is another typo in the doc:
Flask.current_app.extensions['dynamodb']
should beflask.current_app.extensions['dynamo']