Metadata-Version: 2.4
Name: pyfsr
Version: 0.2.2
Summary: Python implementation of the FortiSOAR REST API
Project-URL: Homepage, https://github.com/ftnt-dspille/pyfsr
Project-URL: Bug Tracker, https://github.com/ftnt-dspille/pyfsr/issues
Project-URL: Docmentation, https://ftnt-dspille.github.io/pyfsr/
Author-email: Dylan Spille <dspille@fortinet.com>
License: MIT
License-File: LICENSE
Keywords: api,fortinet,fortisoar,rest
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Requires-Dist: requests>=2.31.0
Provides-Extra: docs
Requires-Dist: pydata-sphinx-theme; extra == 'docs'
Requires-Dist: sphinx-autoapi>=3.0.0; extra == 'docs'
Requires-Dist: sphinx-autodoc-typehints>=1.25.2; extra == 'docs'
Requires-Dist: sphinx-rtd-theme>=1.3.0; extra == 'docs'
Requires-Dist: sphinx>=7.0.0; extra == 'docs'
Provides-Extra: test
Requires-Dist: pytest; extra == 'test'
Requires-Dist: pytest-cov; extra == 'test'
Requires-Dist: pytest-mock; extra == 'test'
Description-Content-Type: text/markdown

# pyfsr

[Documentation](https://ftnt-dspille.github.io/pyfsr/) | [Installation](#installation) | [Quick Start](#quick-start)

**PyFSR** is a Python client library for the FortiSOAR REST API, allowing you to interact with FortiSOAR
programmatically.

## Installation

```bash
pip install pyfsr
```

## Quick Start

```python
from pyfsr import FortiSOAR

# Initialize the client
client = FortiSOAR('your-server', 'your-token')
# or
# client = FortiSOAR('your-server', ('your-username', 'your-password'))

# Generic get call to Alerts endpoint
response = client.get('/api/v3/alerts')

# Create an alert
alert_data = {
    "name": "Test Alert",
    "description": "This is a test alert",
    "severity": "High"
}
alert_record = client.alerts.create(**alert_data)

# List all alerts
alerts = client.alerts.list()

# Get a specific alert
alert = client.alerts.get("alert-id")
```

## Features

- Simple API interface
- Support for all FortiSOAR API endpoints using a generic `get`, `post`, `put`, `delete` methods
- Authentication handling
- Type hints for better IDE support

## Roadmap

- Add support for more API endpoints
- Add support for more complex API calls
    - Filtering
    - Pagination
    - Starting Playbooks
- HMAC Authentication
- Better Unit Testing

## Important Notes

This library is a work in progress and is not yet ready for production use.

