Skip to main content

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


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)

Uploaded Source

Built Distribution

licel_alice_api-0.1.0-py3-none-any.whl (14.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page