Python component to make HTTP RESTful requests.
pip install fgslpyrest
The sequence of commands below make a HTTP GET request and check if the response has the word "German". The response, in this case, is HTML. The last parameter enables verbose output.
$ python
>>> from fgslpyrest.http.Rest import Rest
>>> rest = Rest()
>>> response = rest.doGet([],"https://time.is/pt_br/UTC",200,True)
>>> print(response.find("German"))
The next sequence of commands make a HTTP request which returns a JSON object.
$ python
>>> import json
>>> from fgslpyrest.http.Rest import Rest
>>> rest = Rest()
>>> response = rest.doGet([],"https://reqres.in/api/users/2",200)
>>> user = json.loads(response)
>>> print(user["data"]["email"])
- PKG-INFO describes the package in a summarized way.
- MANIFEST.in defines which files will be included into the package.
- pyproject.toml defines the general packaging information.
python -m build --sdist .
Requires build
module. You can install it using pip install build
.
twine upload dist/*