Metadata-Version: 2.4
Name: hfortix-core
Version: 0.5.163
Summary: Core foundation for HFortix - Fully-typed Fortinet SDK with async support and type safety
Author-email: "Herman W. Jacobsen" <herman@wjacobsen.fo>
Maintainer-email: "Herman W. Jacobsen" <herman@wjacobsen.fo>
License: Proprietary
Project-URL: Homepage, https://github.com/hermanwjacobsen/hfortix
Project-URL: Repository, https://github.com/hermanwjacobsen/hfortix
Project-URL: Documentation, https://hfortix.readthedocs.io/
Project-URL: Bug Tracker, https://github.com/hermanwjacobsen/hfortix/issues
Project-URL: Changelog, https://github.com/hermanwjacobsen/hfortix/blob/main/CHANGELOG.md
Project-URL: Source Code, https://github.com/hermanwjacobsen/hfortix
Project-URL: Download, https://pypi.org/project/hfortix-core/#files
Keywords: fortinet,fortigate,fortios,api,sdk,typed,type-hints,pydantic,async,asyncio,automation,network-automation,network-administration,configuration-management,infrastructure-as-code,network-as-code
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: Intended Audience :: Information Technology
Classifier: License :: Other/Proprietary License
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Networking
Classifier: Topic :: System :: Systems Administration
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Framework :: AsyncIO
Classifier: Framework :: Pydantic
Classifier: Typing :: Typed
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: httpx[http2]>=0.27.0
Requires-Dist: typing_extensions>=4.0.0
Provides-Extra: docs
Requires-Dist: sphinx>=7.0.0; extra == "docs"
Requires-Dist: sphinx-rtd-theme>=1.3.0; extra == "docs"
Requires-Dist: sphinx-autodoc-typehints>=1.24.0; extra == "docs"
Requires-Dist: sphinx-copybutton>=0.5.2; extra == "docs"
Requires-Dist: sphinx-design>=0.5.0; extra == "docs"
Requires-Dist: myst-parser>=2.0.0; extra == "docs"
Dynamic: license-file

# HFortix-Core

[![PyPI version](https://badge.fury.io/py/hfortix-core.svg)](https://pypi.org/project/hfortix-core/)
[![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
[![Documentation Status](https://readthedocs.org/projects/hfortix-core/badge/?version=latest)](https://hfortix-core.readthedocs.io/en/latest/)
[![License](https://img.shields.io/badge/License-Proprietary-blue.svg)](LICENSE)
[![Typing: Typed](https://img.shields.io/badge/typing-typed-green.svg)](https://peps.python.org/pep-0561/)

**HFortix-Core** provides the foundational utilities, protocols, and base classes for the HFortix ecosystem, including HTTP client infrastructure, observability tools, and shared abstractions.

## 🚀 Quick Start

```bash
pip install hfortix-core
```

> **Note:** This is a foundational library. Most users should install `hfortix-fortios` or `hfortix` instead.

```python
from hfortix_core import ObservableHTTPClient, HTTPRequestEvent

# Use the observable HTTP client with event tracking
client = ObservableHTTPClient(base_url="https://api.example.com")

# Subscribe to request events
def log_requests(event: HTTPRequestEvent):
    print(f"{event.method} {event.url} - {event.status_code}")

client.subscribe(log_requests)

# Make requests
response = await client.get("/status")
```

## ✨ Key Features

- **🔌 HTTP Client Infrastructure** - Modern async HTTP client with httpx backend
- **📊 Observability Protocol** - Event-driven architecture for monitoring and debugging
- **🏗️ Base Abstractions** - Shared protocols and interfaces for Fortinet API clients
- **⚡ High Performance** - HTTP/2 support, connection pooling, and async/await
- **🛡️ Production Ready** - Comprehensive error handling and validation

## 📦 What's Included

### HTTP Client Infrastructure
- `ObservableHTTPClient` - Event-driven HTTP client with observability hooks
- Connection pooling and HTTP/2 support via httpx
- Automatic retry logic and error handling
- Session management and authentication helpers

### Observability Protocol
- Event-based monitoring system
- Request/response tracking
- Performance metrics collection
- Debugging and audit trail support

### Base Abstractions
- Protocol definitions for Fortinet API clients
- Shared type definitions and models
- Common utility functions
- Error handling infrastructure

## 🔗 Related Packages

- **[hfortix-fortios](https://pypi.org/project/hfortix-fortios/)** - FortiOS/FortiGate API client
- **[hfortix](https://pypi.org/project/hfortix/)** - Meta-package installing all HFortix packages

## 📚 Documentation

- **[Full Documentation](https://hfortix-core.readthedocs.io/)**
- **[API Reference](https://hfortix-core.readthedocs.io/en/latest/api/)**
- **[GitHub Repository](https://github.com/hermanwjacobsen/hfortix-core)**

## 🤝 Contributing

This is a proprietary library. For support or feature requests, please contact the maintainer.

## 📄 License

Proprietary License - See LICENSE file for details.

---

**Part of the HFortix ecosystem** - Modern Python SDKs for Fortinet automation
