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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file licel_alice_api-0.1.0.tar.gz.

File metadata

  • Download URL: licel_alice_api-0.1.0.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.9.1

File hashes

Hashes for licel_alice_api-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c6a6515bd862be598b40fedc71f85b2378cfc657f7c242ae8bdc2061b817d813
MD5 405bcc2fbe37211a437e1d315165bbc3
BLAKE2b-256 b5c8959b0fa176b04627542b84072fd02382517afe5f288b14a1d91a6cddcc59

See more details on using hashes here.

File details

Details for the file licel_alice_api-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: licel_alice_api-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 14.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.9.1

File hashes

Hashes for licel_alice_api-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7ac6037d86f29231475131e394c7d9c290a37e4b4eead1b034fb7cc881037021
MD5 7a6ae787fadf2a51b30af0e958976278
BLAKE2b-256 56e6df1c0e56368123c21725cdcfe133c33e5646bc549ff3993e0726e5a540d6

See more details on using hashes here.

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