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.28.tar.gz (32.1 kB view details)

Uploaded Source

Built Distribution

ahi-0.19.28-py2.py3-none-any.whl (40.5 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: ahi-0.19.28.tar.gz
  • Upload date:
  • Size: 32.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.1.dev0+g94f810c.d20240510 CPython/3.12.4

File hashes

Hashes for ahi-0.19.28.tar.gz
Algorithm Hash digest
SHA256 1607ea4b05651bb987d72407e7ff48f50e37d5b8bd987b7904770229b73f3558
MD5 9144927fdbbfb39d2c6de2a32c3c1c93
BLAKE2b-256 1899fbcbe67e980a32fa5ddfd16d0b750487e29169ef7c552d4e482c0b315370

See more details on using hashes here.

File details

Details for the file ahi-0.19.28-py2.py3-none-any.whl.

File metadata

  • Download URL: ahi-0.19.28-py2.py3-none-any.whl
  • Upload date:
  • Size: 40.5 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.1.dev0+g94f810c.d20240510 CPython/3.12.4

File hashes

Hashes for ahi-0.19.28-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 e0b1b82ff793e56428c1a5f9963d1e3ed191dc3c6fa4513f9729fcda0c03b604
MD5 93d02efe0edfd53eaf3b239b779edac4
BLAKE2b-256 1319b4e71822f0be3d3df6771d9e974d87c16851db07e06693e0c3b6b46dcc35

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