python web based json sql messages project http requests simple
$30-250 USD
Lezárt
Kiadva ekkor: több mint 3 évvel ezelőtt
$30-250 USD
Teljesítéskor fizetve
working on a database-backed web-app in which you have to fix bugs and add new functionality. The database of the application can be queried through SQL and has the following schema: ![db schema](resources/[login to view URL])
This is a simplified version of our bot schema, in which an `answer` (something that a bot says) consists of several, potentially deeply nested "blocks" (that are all stored as one big JSON blob per answer in the `blocks` table). These blocks represent functionality, such as showing text, showing images, performing HTTP requests, etc. The lower row of the diagram shows the `messages` table which show the messages that the bot has sent. Finally, `state` includes some conversation state that will be relevant in the first challenge.
Unlike in real-life there is also a test-suite that will give you instant feedback on whether your solution works or not. You can run the tests through `python3 tests/[login to view URL]` (there is also a script that uses docker if your Python installation isn't up to date!).
# Challenge 1: Messages
The `/messages` endpoint returns all the messages in the database. Try running the application and hitting the endpoint [in your browser](http://localhost:5000/messages) or through `curl http://localhost:5000/messages` (do it now!).
Unfortunately, as you can see, the messages only show the message *template* instead of the actual message because the variable values have not been filled in! In our message template, variables are identified by `{|}`. Everything after the initial `{` and before the `|` is the variable id, and everything after the `|` but before the closing `}` is a _fallback_ value, in case there is no value for this variable.
In this application, variable values are stored in the `state` table. For example, consider the template string `Hello {asdf|planet}`. If the `state` table has a row with the id `asdf`, and value of `Earth`, then the processed message should read `Hello Earth`. If no such row exists, then the string should read `Hello planet`.
Your mission, should you choose to accept it, is to modify the `/messages` route to fill in the correct variable values into the messages so that we may all profit from the wisdom within!
You can test your result by running `python3 tests/[login to view URL]`
# Challenge 2: Search
The `/search` endpoint performs a search for answers based on their titles, for example:
```sh
curl -d '{"query":"Star Trek"}' -H "Content-Type: application/json" -X POST http://localhost:5000/search
```
will result in
```js
[{
"id": 3,
"title": "Star Trek API"
}]
```
Due to changing business requirements and demanding clients, you will now have to modify the endpoint to not only return the _full_ answer (including its blocks), but also allow search within the content block fields! Don't forget to _also_ search the title, and while you're at it, please make sure that the endpoint `400`s on invalid input, as is best practice. Lastly, we now also want to support searching for multiple terms that **all** have to show up **somewhere** in the answer.
You can test your solution through `tests/[login to view URL]`. Have a look at it too, as it will probably answer a lot of the questions you may be having
My budget is $50
Hi there,
I'm bidding on your project "python web based json sql messages project http requests simple"
Being an expert in Python and matlab programming I can do this project for you. please leave a message on my chat so we can discuss the budget and deadline of the project. Also, have a look at my profile for my reviews and portfolios. Thanks
Note: This is not an automated bid and i'm ready to discuss your project right now.
..
.
Hi!
Your budget is $50, but I have read your requirement very carefully.
I understand that you want like a Python programmer.
For over 8 years, I have developed many Python projects.
I am glad to bid to you about one of my major skills.
I can work with you in your time zone.
I really hope work with you.
please contact with me .
Best regards.
from your lovely Anton P.
I'm a Python Developer and work in web development since 2017. It would be great to do this project! I only want to have more experience in this platform and show what I can do!