rest-api-agr


Namerest-api-agr JSON
Version 0.4.7 PyPI version JSON
download
home_pagehttps://github.com/AbelGRubio/01-rest-api.git
SummaryThis package is made for an example of REST API.
upload_time2024-01-03 11:46:38
maintainer
docs_urlNone
authoragrubio
requires_python>=3.12
license
keywords development setup setuptools
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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
* http://localhost:5000/path_1/unique_visited_readable
* http://localhost:5000/path_1/history_readable


# 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

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/AbelGRubio/01-rest-api.git",
    "name": "rest-api-agr",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.12",
    "maintainer_email": "",
    "keywords": "development,setup,setuptools",
    "author": "agrubio",
    "author_email": "ablg11673@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/cc/83/54b39d8aef5afba87ae587b4a91c320e03b3960c87308b575d91e147c48e/rest_api_agr-0.4.7.tar.gz",
    "platform": null,
    "description": "# api test\r\n\r\n\r\nThis test is about REST API and AMQP.\r\n\r\nThe control version that I am using is git, so you can find two branches:  \r\n\r\n* 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\r\n* AMQP: It is the same that the previous one, but using a declared queue to register the visits.\r\n\r\nThe possible path are:\r\n\r\n* http://localhost:5000/\r\n* http://localhost:5000/path_1\r\n* http://localhost:5000/path_2\r\n* http://localhost:5000/path_1/sub_path_1\r\n* http://localhost:5000/unique_visited\r\n* http://localhost:5000/history\r\n* http://localhost:5000/close_amqp\r\n\r\nThere are two endpoints more. It's just for see on the web browser\r\n* http://localhost:5000/path_1/unique_visited_readable\r\n* http://localhost:5000/path_1/history_readable\r\n\r\n\r\n# Using the script\r\n\r\nThe main script is 'app.py' to run it, you must type the following:\r\n\r\n```\r\npython app.py\r\n```\r\n\r\nIf you desire mount the server in another ip you should type the following:\r\n\r\nFor instance, at the ip 192.168.1.128\r\n```\r\npython app.py 192.168.1.128\r\n```\r\n\r\nTo stop the server, you must follow this steps:\r\n\r\n1. 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. \r\n2. Then, you can stop the server using the shortcut CTRL+C\r\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "This package is made for an example of REST API.",
    "version": "0.4.7",
    "project_urls": {
        "Homepage": "https://github.com/AbelGRubio/01-rest-api.git"
    },
    "split_keywords": [
        "development",
        "setup",
        "setuptools"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5f97ddc1f96fc0df1d650fa160f33b7f745d003942ea81d5753423ed1192caf7",
                "md5": "c064fe2e419938f83e748f6c5b6a9963",
                "sha256": "c915a22dff3ed5964ffecdde1add333592f1b93e2f31be16f5d9fa6cfc2bf691"
            },
            "downloads": -1,
            "filename": "rest_api_agr-0.4.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c064fe2e419938f83e748f6c5b6a9963",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.12",
            "size": 1899,
            "upload_time": "2024-01-03T11:46:37",
            "upload_time_iso_8601": "2024-01-03T11:46:37.089670Z",
            "url": "https://files.pythonhosted.org/packages/5f/97/ddc1f96fc0df1d650fa160f33b7f745d003942ea81d5753423ed1192caf7/rest_api_agr-0.4.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cc8354b39d8aef5afba87ae587b4a91c320e03b3960c87308b575d91e147c48e",
                "md5": "3e59a62fd773f4bb4d16f7a02f432d99",
                "sha256": "c4ad21a2384bb41af27b871cc86cbf622db1ff878df81a9376046698433cf19c"
            },
            "downloads": -1,
            "filename": "rest_api_agr-0.4.7.tar.gz",
            "has_sig": false,
            "md5_digest": "3e59a62fd773f4bb4d16f7a02f432d99",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.12",
            "size": 2536,
            "upload_time": "2024-01-03T11:46:38",
            "upload_time_iso_8601": "2024-01-03T11:46:38.731102Z",
            "url": "https://files.pythonhosted.org/packages/cc/83/54b39d8aef5afba87ae587b4a91c320e03b3960c87308b575d91e147c48e/rest_api_agr-0.4.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-03 11:46:38",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "AbelGRubio",
    "github_project": "01-rest-api",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "tox": true,
    "lcname": "rest-api-agr"
}
        
Elapsed time: 0.18320s