This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
"""See flask.palletsprojects.com. This used Flask 1.1.1. Run with: | |
FLASK_APP=simple_flask_server.py flask run -h 127.0.0.1 | |
""" | |
from flask import Flask, request | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
"""An example of cursor dealing with prepared statements. | |
A cursor can be used as a regular one, but has also a prepare() statement. If | |
prepare() is called, execute() and executemany() can be used without query: in | |
this case the parameters are passed to the prepared statement. The functions | |
also execute the prepared statement if the query is the same prepared before. | |
Prepared statements aren't automatically deallocated when the cursor is | |
deleted, but are when the cursor is closed. For long-running sessions creating |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
"""A simple HTTP server with REST and json for python 3. | |
addrecord takes utf8-encoded URL parameters | |
getrecord returns utf8-encoded json. | |
""" | |
import argparse | |
import json |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.