pAPI SDK
pAPI SDK is a python SDK for ETG APIv3. The abbreviation "pAPI" stands for "Partner API".
Requirements
- Python 3.6+
- requests
- pydantic
Installation
pip install papi-sdk
Quickstart
To start using ETG APIv3 you need a key, which you received after registration.
A key is a combination of an id and uuid. These are passed into each request as a Basic Auth header after initialization.
APIv3 supports all arguments provided by requests, ex. timeout.
from papi_sdk import APIv3
papi = APIv3(key='1000:022a2cf1-d279-02f3-9c3c-596aa09b827b', timeout=15)
Then you can use all available methods. Say you want to check an overview of the available methods (which is api/b2b/v3/overview endpoint), you do:
overview = papi.overview(timeout=1)
Another example is downloading hotels dump with api/b2b/v3/hotel/info/dump endpoint:
data = HotelInfoDumpRequest(language='ru')
dump = papi.get_hotel_info_dump(data=data)
print(dump.data.url)
Note: if you don't provide your headers and specifically your User-Agent in requests options then it will be automatically added, ex. papi-sdk/v1.0.2 requests/2.25.1 (python/3.8)
Metadata
Release files for papi-sdk 1.1.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 | Provenance | Actions |
|---|---|---|---|---|
| papi-sdk-1.1.1.tar.gz | 41.2 kB | Without provenance | Details for papi-sdk-1.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| papi_sdk-1.1.1-py3-none-any.whl | Python 3 | none | any | Details for papi_sdk-1.1.1-py3-none-any.whl |
Total release size: 102.9 kB
Release files / papi-sdk-1.1.1.tar.gz
| Download URL | papi-sdk-1.1.1.tar.gz |
|---|---|
| Size | 41.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0b1d4663092446ccfb111793fbc2018d65d045cb03b4c7aa99335cf66f6d694b
|
|
BLAKE2b-256 checksum How to use checksums |
35e7eaeb78d2efc3806da42c03496919b7e988d3e21d158acbf8a48b01d321c0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.4 CPython/3.8.7 Linux/5.4.0-1036-azure
|
Release files / papi_sdk-1.1.1-py3-none-any.whl
| Download URL | papi_sdk-1.1.1-py3-none-any.whl |
|---|---|
| Size | 61.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
47ec550830285c320731267e4aa8a2d40336285f2c21e6c6694f56c14bcd53cb
|
|
BLAKE2b-256 checksum How to use checksums |
aa9f9e424f92e042b35ef39065b56e134de8595f2d5a414a1f53d045301f0d83
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.4 CPython/3.8.7 Linux/5.4.0-1036-azure
|
Security for papi-sdk 1.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.