Library to consume qanalytics API services (https://www.qanalytics.cl)
Install:
pip3 install qanalytics_python
For example
To consume the service "Webservices QMGPS"
- endpoint: "/gps_test/service.asmx"
- method: "WM_INS_REPORTE_PUNTO_A_PUNTO"
- params:
from datetime import datetime
from qanalytics_python.qanalytics import QAnalytics
qa_client = QAnalytics("WS_test", "$$WS17")
data = {
"ID_REG": "test",
"LATITUD": -32.1212,
"LONGITUD": -72.551,
"VELOCIDAD": 0,
"SENTIDO": 0,
"FH_DATO": datetime.strptime("2019-12-27 08:23:50", '%Y-%m-%d %H:%M:%S'),
"PLACA": "TEST",
"CANT_SATELITES": 1,
"HDOP": 1,
"TEMP1": 999,
"TEMP2": 999,
"TEMP3": 999,
"SENSORA_1": -1,
"AP": -1,
"IGNICION": -1,
"PANICO": -1,
"SENSORD_1": -1,
"TRANS": "TEST",
}
resp = qa_client.send_request(data, "/gps_test/service.asmx", "WM_INS_REPORTE_PUNTO_A_PUNTO")
print(f"response code: {resp.code.name}")
print(f"response text: {resp.text}")
print(f"response code: {resp.http_code}")
Note that for fields of type "DATETIME" you must pass an object of type "datetime.datetime" as a parameter.
Conversion Example:
date_str = "2019-12-27 08:23:50"
datetime.strptime(date_str, '%Y-%m-%d %H:%M:%S')
Metadata
Release files for qanalytics-python 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| qanalytics_python-1.0.1.tar.gz | 4.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| qanalytics_python-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.0 kB
Release files / qanalytics_python-1.0.1.tar.gz
| Download URL | qanalytics_python-1.0.1.tar.gz |
|---|---|
| Size | 4.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cc66afd395322a87d3f6540d0471341120ee81538d5f5963dd5f83fbdd600a68
|
|
BLAKE2b-256 checksum How to use checksums |
5a4b5e55c1ca03b356bc4aceabec862105c13b0893aabb6a90ed4879a0b5cb52
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/41.1.0 requests-toolbelt/0.8.0 tqdm/4.37.0 CPython/3.7.5rc1
|
Release files / qanalytics_python-1.0.1-py3-none-any.whl
| Download URL | qanalytics_python-1.0.1-py3-none-any.whl |
|---|---|
| Size | 5.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4c5c65bbfee9e31b47fe264dbfb44b25ff7ef67a05e095ebcce0c712f7b4c417
|
|
BLAKE2b-256 checksum How to use checksums |
a400926090537150fb0593abc0c0b4fefbdb0596c1c32976bf0d802e1c869788
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/41.1.0 requests-toolbelt/0.8.0 tqdm/4.37.0 CPython/3.7.5rc1
|