Alice API
Project description
Alice API
Usage
# 1. Import `AliceAPI` and authorize
from licel_alice_api import AliceAPI, ListParams, SortParams, PageParams, SortDirection
client = AliceAPI(username="my_username", password="my_password")
# 2. Use methods for get data
res = client.get_pkp_incident_list()
# 3. Client returns typed result.
# For getting raw data you can use property `raw`
print(res.raw)
print(res.list.raw)
print(res.list[0].raw)
# 4. Sort, paginate and search
res = client.get_pkp_incident_list(
params=ListParams(
sort=SortParams("time", SortDirection.DESC), # sort descendant by time
page=PageParams(1, 50), # get get first page per 50 elements on page
query="$fingerprint ~ 'Android' and ($type='PKP' or $id=123)"
# search incidents where fingerprint contain 'Android' and incident is HPKP or id is 123
)
)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
licel_alice_api-0.1.0.tar.gz
(9.4 kB
view hashes)
Built Distribution
Close
Hashes for licel_alice_api-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ac6037d86f29231475131e394c7d9c290a37e4b4eead1b034fb7cc881037021 |
|
MD5 | 7a6ae787fadf2a51b30af0e958976278 |
|
BLAKE2b-256 | 56e6df1c0e56368123c21725cdcfe133c33e5646bc549ff3993e0726e5a540d6 |