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 details)
Built Distribution
File details
Details for the file rest_api_agr-0.4.7.tar.gz
.
File metadata
- Download URL: rest_api_agr-0.4.7.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/42.0 requests/2.31.0 requests-toolbelt/1.0.0 urllib3/2.1.0 tqdm/4.66.1 importlib-metadata/7.0.1 keyring/24.3.0 rfc3986/2.0.0 colorama/0.4.6 CPython/3.12.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4ad21a2384bb41af27b871cc86cbf622db1ff878df81a9376046698433cf19c |
|
MD5 | 3e59a62fd773f4bb4d16f7a02f432d99 |
|
BLAKE2b-256 | cc8354b39d8aef5afba87ae587b4a91c320e03b3960c87308b575d91e147c48e |
File details
Details for the file rest_api_agr-0.4.7-py3-none-any.whl
.
File metadata
- Download URL: rest_api_agr-0.4.7-py3-none-any.whl
- Upload date:
- Size: 1.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/42.0 requests/2.31.0 requests-toolbelt/1.0.0 urllib3/2.1.0 tqdm/4.66.1 importlib-metadata/7.0.1 keyring/24.3.0 rfc3986/2.0.0 colorama/0.4.6 CPython/3.12.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c915a22dff3ed5964ffecdde1add333592f1b93e2f31be16f5d9fa6cfc2bf691 |
|
MD5 | c064fe2e419938f83e748f6c5b6a9963 |
|
BLAKE2b-256 | 5f97ddc1f96fc0df1d650fa160f33b7f745d003942ea81d5753423ed1192caf7 |