This package is made for an example of REST API.
Project description
api test
This test is about REST API and AMQP.
The control version that I am using is git, so you can find two branches:
- master: It is a simple use of REST API. To do this, I am using flask, and to register the visits I am using a defined logger
- AMQP: It is the same that the previous one, but using a declared queue to register the visits.
The possible path are:
- http://localhost:5000/
- http://localhost:5000/path_1
- http://localhost:5000/path_2
- http://localhost:5000/path_1/sub_path_1
- http://localhost:5000/unique_visited
- http://localhost:5000/history
- http://localhost:5000/close_amqp
There are two endpoints more. It's just for see on the web browser
Using the script
The main script is 'app.py' to run it, you must type the following:
python app.py
If you desire mount the server in another ip you should type the following:
For instance, at the ip 192.168.1.128
python app.py 192.168.1.128
To stop the server, you must follow this steps:
- Go to http://localhost:5000/close_amqp. That will execute a close_consuming function to the queue. This step is done on the AMQP branch, not otherwise.
- Then, you can stop the server using the shortcut CTRL+C
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
rest_api_agr-0.4.7.tar.gz
(2.5 kB
view hashes)
Built Distribution
Close
Hashes for rest_api_agr-0.4.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c915a22dff3ed5964ffecdde1add333592f1b93e2f31be16f5d9fa6cfc2bf691 |
|
MD5 | c064fe2e419938f83e748f6c5b6a9963 |
|
BLAKE2b-256 | 5f97ddc1f96fc0df1d650fa160f33b7f745d003942ea81d5753423ed1192caf7 |