Metadata-Version: 2.1
Name: ahi
Version: 0.19.27
Summary: Application Hacking Interface. An HTTP API client helper for "unofficial" APIs.
Home-page: https://gitlab.com/unsanctioned/ahi
License: LGPLv3+
Author: beruu
Author-email: 18537787-beruu@users.noreply.gitlab.com
Classifier: License :: Other/Proprietary License
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Provides-Extra: browser-emulation
Requires-Dist: PySocks (>=1.7.1,<2.0.0)
Requires-Dist: hiredis (>=2.0.0,<3.0.0)
Requires-Dist: parsel (>=1.6.0,<2.0.0)
Requires-Dist: redis (>=3.5.3,<4.0.0)
Requires-Dist: requests (>=2.26.0,<3.0.0)
Requires-Dist: selenium (>=3.141.0,<4.0.0) ; extra == "browser-emulation"
Requires-Dist: urllib3 (>=1.26.6,<2.0.0)
Description-Content-Type: text/markdown

# Application Hacking Interface

## Using the simple HTTPClient
```python
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
```python
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
```bash
girl --curl https://example.com/
```

