![]() Let me know in the comments if you’d like to read about this. If enough people are interested in the topic, a future blog post could look into how to change over to SQLAlchemy instead. The database for this project will be PostgreSQL, which we’ll communicate with using psycopg2 and plain SQL, because we can. To keep separation of concerns, we’ll separate the API layer from the data layer. We’ll both accept and return JSON, and Flask-RESTful takes care of most of this for us. We’ll be using Flask together with Flask-restful to create our API. If you have any cool ideas of what to do with it, let me know in the comments below! Please keep in mind that the code is not production ready. I’d like to use this code base in future blog posts, as there are many possible ways to extend it. See the example_requests.http file for a complete walkthrough of defining a restaurant, its menu, and then placing an order through the REST API. /restaurants//menu for the actual food items. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |