A Python wrapper for the HQData API
Project description
HQData API Wrapper
This is a Python package that provides a convenient wrapper for interacting with the HQData API. It allows you to easily run and fetch job/result data from the HQData service.
Installation
You can install the package using pip:
pip install hqdata-api-wrapper
Examples
Here's a simple example of how to use the HQData class from the hqdata_api_wrapper package:
from hqdata_api_wrapper import HQData
# Create an instance of HQData worker
worker = HQData(apikey="your_api_key")
# Create an instance of HQData worker without debug prints and without autofetching / waiting for results
worker = HQData(apikey="your_api_key", autofetch=False, debug_messages=False)
# Example: list available modules and their fields
modules = worker.modules()
print(modules)
# Example: run scrape module
#module parameter = module name
#payload = dictionary of required/optional module fields
result = wroker.run(module="scrape", payload={"url": "https://hqdata.com", "contact_details": False, "recursive_contact_details": False, "pattern_scan": False, "js_scenario": "click://button[@aria-label='Example Xpath'];send_keys://input[@class='example']:Test Value;scroll:y:750"})
# Example: list jobs and optional filters
result = worker.fetch(page="2", status="success")
# Example: fetch result
result = worker.fetch(id=job_id)
# Example: fetch html of scraping job
result = worker.fetch(id=job_id, fetch="html")
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
File details
Details for the file hqdata_api_wrapper-0.0.4.tar.gz.
File metadata
- Download URL: hqdata_api_wrapper-0.0.4.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
10114a56c0226fa87b105e51ce2353c58b2b1e237517f266b02e35d25011d6d2
|
|
| MD5 |
9d2f699dac6531aa0368eea59c82807a
|
|
| BLAKE2b-256 |
bc2c5c332a8f60e4fd9364dcc4aeec0b98113fdd0848f6aacea6ede95edaacc2
|