Metadata-Version: 2.4
Name: pyail
Version: 0.0.13
Summary: Python API for AIL
License-Expression: BSD-2-Clause
License-File: LICENSE
Author: Aurelien Thirion (terrtia)
Author-email: <aurelien.thirion@circl.lu>
Requires-Python: >=3.8,<4.0
Classifier: Programming Language :: Python :: 3
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
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Dist: requests (>=2.23.0,<3.0.0)
Project-URL: Repository, https://github.com/ail-project/PyAIL
Project-URL: issues, https://github.com/ail-project/PyAIL/issues
Description-Content-Type: text/markdown

PyAIL
======

[![Python 3.6](https://img.shields.io/badge/python-3.6+-blue.svg)](https://www.python.org/downloads/release/python-360/)

# PyAIL - Python library using the AIL Rest API

PyAIL is a Python library to access [AIL](https://github.com/ail-project/ail-framework) platforms via their REST API.

## Install from pip

**It is strongly recommended to use a virtual environment**

If you want to know more about virtual environments, [python has you covered](https://docs.python.org/3/tutorial/venv.html)

Install pyail:
```bash
pip3 install pyail
```

## Usage

### Creating an AIL client

```python
from pyail import PyAIL

ail_url = 'https://localhost:7000'
ail_key = '<AIL API KEY>'
try:
    pyail = PyAIL(ail_url, ail_key, ssl=False)
except Exception as e:
    print(e)
    sys.exit(0)

pyail.ping()
```

### Feeding items to AIL

```python
data = 'my item content'
metadata = {}
source = '<FEEDER NAME>'
source_uuid = '<feeder UUID v4>'

pyail.feed_json_item(data, metadata, source, source_uuid)
```
### Import Crawler capture

```python
pyail.import_crawler_capture(capture={"last_redirected_url": "https://mywebsite.com", "html": "<html><body><h1>HELLO WORLD</h1></body></html>"})
```

# License


This software is licensed under BSD 3-Clause License

Copyright (C) 2020-2025 CIRCL - Computer Incident Response Center Luxembourg

Copyright (C) 2020-2025 Aurelien Thirion




