Workspace
Your workspace is all the files you have open in a directory. You want your AI assistant to consider all these files when giving you a recommendation. Let’s look at the following web project where the following files exist:
src/
app.py
utils.py
app.py
contains an API and utils.py
contains an email validation function. Here’s the code for app.py
:
# create a web api using Flask, should have a products GET route
from flask import Flask, jsonify
app = Flask(__name__)
@app.route('/customers, methods=['GET'])
def get_customers():
return jsonify({'customers': ['item1', 'item2', 'item3']})
# TODO, create a POST route for products
# Run the app
if __name__ == '__main__':
app.run(debug=True)
Note the TODO
comment; we’re about to add a route to store a customer. When storing this customer, we need to ensure that the customer data contains a valid email. Luckily, the utils...