Skip to main content

Application Hacking Interface. An HTTP API client helper for "unofficial" APIs.

Project description

Application Hacking Interface

Using the simple HTTPClient

from logging import *
c = ahi.HTTPClient(cache_ttl=60, force_wait_interval=1, auto_adjust_for_rate_limiting=True, logging_level=DEBUG, proxy='http://127.0.0.1:8080', verify=True, allow_redirects=False, timeout=None)
resp = c.get('http://example.com/')
print(resp)

Using the Selenium driver for Firefox

from logging import *
from selenium.webdriver.common.keys import Keys
ff = ahi.SeleniumFirefox(headless=True, force_wait_interval=timedelta(seconds=0), logging_level=DEBUG)
ff.get('https://example.com/')
ff.html.css('#LoginForm_Password').send_keys('P4$$w0rd')
ff.html.css('#LoginForm_Password').send_keys(Keys.RETURN)
ff.execute_script('''SetLocation('\x2Fdocs\x2FProMyPlanning.aspx?_Division_=549942',event, 0)''')
ff.html.css('#Reports_Reports_Reports_MyPlanning').click()
print(ff.html)

Converting from a curl command line

girl --curl https://example.com/

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

ahi-0.19.35.tar.gz (32.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ahi-0.19.35-py3-none-any.whl (41.5 kB view details)

Uploaded Python 3

File details

Details for the file ahi-0.19.35.tar.gz.

File metadata

  • Download URL: ahi-0.19.35.tar.gz
  • Upload date:
  • Size: 32.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.13.3 Linux/6.14.2-arch1-1

File hashes

Hashes for ahi-0.19.35.tar.gz
Algorithm Hash digest
SHA256 17635d39bdec42be6c355a997b8919dcf3c876c49e806decfb3b3e33bf954519
MD5 bdeb28dd290140e1ce999402851d2252
BLAKE2b-256 c88280b39c459f153038e7d5e82926a0e23bdbdb9dc145b4141a9b0dfd5e12ad

See more details on using hashes here.

File details

Details for the file ahi-0.19.35-py3-none-any.whl.

File metadata

  • Download URL: ahi-0.19.35-py3-none-any.whl
  • Upload date:
  • Size: 41.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.13.3 Linux/6.14.2-arch1-1

File hashes

Hashes for ahi-0.19.35-py3-none-any.whl
Algorithm Hash digest
SHA256 86351a6c0c0c20061c476bc9402eafc7d0ad12bab5429e95f6a70981fa7550a1
MD5 faa25b04b52ce39dc1be56ecad9c9e9f
BLAKE2b-256 afed21792ca3354befda19e9fb4b680796e6f6104882f2ff34e16ad1ea921954

See more details on using hashes here.

Supported by

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