Metadata-Version: 2.4
Name: floowguard
Version: 0.1.0
Summary: Python client SDK for the Floowguard policy engine
Author-email: Floowguard <dev@floowguard.com>
License: Proprietary
Project-URL: Homepage, https://floowguard.com
Keywords: floowguard,product-limiting,policy,abuse
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Intended Audience :: Developers
Classifier: License :: Other/Proprietary License
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: requests>=2.0.0

# Floowguard Python SDK

A minimal Python client for the Floowguard policy engine, mirroring the Node.js SDK interface.

## Installation

This package depends on `requests`:

```bash
pip install requests
```

(If you package this as a library, include `requests` in your own dependency metadata.)

## Usage

```python
import os
from flowguard import FlowGuardApiClient

application_id = os.environ["FLOOWGUARD_APPLICATION_ID"]
client = FlowGuardApiClient(application_id)

identifier = "ACCOUNT_ID_OR_USER_ID"

# Check if this action should be allowed
allowed = client.has_access(
    policy_name="POST_CREATION_LIMIT_EXAMPLE",
    value=identifier,
)

if not allowed:
    raise RuntimeError("You reached your limit for post creation for today. Try tomorrow.")

# Record the successful action and get the latest count
result = client.increment_and_get_policy_count(
    policy_name="POST_CREATION_LIMIT_EXAMPLE",
    value=identifier,
)

print("Current decision:", result.get("response"))
```
