Metadata-Version: 2.4
Name: leakix
Version: 1.0.0
Summary: Official python client for LeakIX (https://leakix.net)
Project-URL: Homepage, https://leakix.net
Project-URL: Repository, https://github.com/LeakIX/LeakIXClient-Python
Project-URL: Issues, https://github.com/LeakIX/LeakIXClient-Python/issues
Project-URL: Changelog, https://github.com/LeakIX/LeakIXClient-Python/blob/main/CHANGELOG.md
Author-email: Danny Willems <danny@leakix.net>, Valentin Lobstein <valentin@leakix.net>
License: MIT
License-File: LICENSE
Keywords: api-client,attack-surface,cybersecurity,exposure,leakix,osint,reconnaissance,security,threat-intelligence,vulnerability
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Security
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: fire<0.8,>=0.5
Requires-Dist: httpx>=0.28.0
Requires-Dist: l9format==2.0.1
Requires-Dist: requests
Description-Content-Type: text/markdown

# LeakIX python client

[![](https://img.shields.io/pypi/v/leakix.svg)](https://pypi.org/project/leakix/)
[![](https://img.shields.io/pypi/pyversions/leakix.svg)](https://pypi.org/project/leakix/)

Official LeakIX python client

## Install

```
pip install leakix
```

To run tests, use `make test`.

## Documentation

Docstrings are used to document the library.
Types are also used to inform the user on what type of objects the functions are
expecting.

Each API response is encoded in either a `SuccessResponse` object or a
`ErrorResponse`.
The methods `is_success()` or `is_error()` exist on each API response.
You can get the actual response by using the method `json()` on the response object.

The output are events described in
[l9format](https://github.com/LeakIX/l9format-python).
When you have an object of type `l9Event` (or the longer
`l9format.l9format.L9Event`), you can refer to
[L9Event](https://github.com/LeakIX/l9format-python/blob/main/l9format/l9format.py#L158)
model class for the available fields.

For instance, to access the IP of an object `event` of type `L9Event`, you can
use `event.ip`.

Each object can be transformed back into a Python dictionary/JSON using the method `to_dict()`.
For instance, for the response of the subdomains endpoint, you can get back individual JSON by using:

```python
def example_get_subdomains():
    response = CLIENT.get_subdomains("leakix.net")
    for subdomain in response.json():
        print(subdomain.to_dict())
```

## Support

Feel free to open an issue if you have any question.
You can also contact us on `support@leakix.net`.

If you need commercial support, have a look at https://leakix.net/plans.

## Examples

See the [example/](example/) directory for complete usage examples:

- [Sync client](example/example_client.py)
- [Async client](example/example_async_client.py)
