Asynchronous client for the LeakRadar.io API
Project description
LeakRadar Async Python Client
A user-friendly, asynchronous Python 3 wrapper for the LeakRadar.io API.
Documentation
See the full API documentation here: https://docs.leakradar.io
Features
- Async/await support using
httpx. - Authentication via Bearer token.
- Customizable User-Agent.
- Error handling with custom exceptions (no retries).
- Easy-to-use methods for:
- Advanced, email and domain search
- Unlocking leaks (all or specific)
- Requesting CSV exports for leaks
- Metadata search
- Managing notifications
- Fetching and updating profile information
Requirements
- Python 3.7+
httpxlibrary (installed automatically)
Installation
pip install leakradar
Usage
- Retrieve your API key from LeakRadar.io Profile.
- Create a client instance, passing your Bearer token.
import asyncio
from leakradar import LeakRadarClient
async def main():
token = "YOUR_BEARER_TOKEN"
async with LeakRadarClient(token=token) as client:
profile = await client.get_profile()
print("User Profile:", profile)
# Perform an advanced search
results = await client.search_advanced(username="john.doe@example.com")
print("Search Results:", results)
# Unlock all matching leaks
unlocked = await client.unlock_all_advanced({"username": "john.doe@example.com"})
print("Unlocked leaks:", unlocked)
# Request an export of the leaks
export_info = await client.export_advanced(username="john.doe@example.com")
print("Export created:", export_info)
asyncio.run(main())
Error Handling
All errors raise a LeakRadarAPIError subclass. For example:
BadRequestError(400)UnauthorizedError(401)ForbiddenError(403)NotFoundError(404)ValidationError(422)TooManyRequestsError(429)
Contributing
Please open an issue or PR if you have suggestions or improvements.
License
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
leakradar-0.1.3.tar.gz
(7.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file leakradar-0.1.3.tar.gz.
File metadata
- Download URL: leakradar-0.1.3.tar.gz
- Upload date:
- Size: 7.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9fa1471f23b80aa6972887a071898b0db5c2fb6cee91188ec4342a808f4704fc
|
|
| MD5 |
9770a231ac66ed40e5dfe83a9084efcd
|
|
| BLAKE2b-256 |
42d45f97f3438324dfd5770d041c7e65b3df1a245be111f9b45bf06c4cbc5f50
|
File details
Details for the file leakradar-0.1.3-py3-none-any.whl.
File metadata
- Download URL: leakradar-0.1.3-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e79511f4a59ddb51da82a824d67dad504cde8c895403427502ae37081e82c4f6
|
|
| MD5 |
f55dfa8378f2612ce8c2660dbe6d0ecd
|
|
| BLAKE2b-256 |
111cff3c721ddead485c03ecfebe3a808b17900630ea92f87a00efce619edcb9
|