Skip to main content

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:

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:

  1. 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.
  2. Then, you can stop the server using the shortcut CTRL+C

Project details


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)

Uploaded Source

Built Distribution

rest_api_agr-0.4.7-py3-none-any.whl (1.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page