Metadata-Version: 2.4
Name: deprecated-decorator-flask
Version: 0.1.0
Summary: Flask decorator to mark pages as deprecated with visual warnings
Author: Flinn Fuchs
License: MIT
Project-URL: Homepage, https://github.com/DiscoveryFox/deprecated-decorator-flask
Project-URL: Repository, https://github.com/DiscoveryFox/deprecated-decorator-flask
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: flask>=2.0.0

# deprecated-decorator-flask

A Flask decorator to mark pages as deprecated with visual warnings and HTTP headers.

## Installation

```bash
pip install deprecated-decorator-flask
```

## Usage

```python
from flask import Flask
from deprecated_decorator_flask import deprecated

app = Flask(__name__)

# Basic usage
@app.route('/old-page')
@deprecated
def old_page():
    return "<html><body><h1>Old Page</h1></body></html>"

# With custom message
@app.route('/old-page2')
@deprecated(message="Use /new-page instead.")
def old_page2():
    return "<html><body><h1>Old Page 2</h1></body></html>"

# With sunset date
@app.route('/old-page3')
@deprecated(message="Use /new-page instead.", sunset="2025-09-01")
def old_page3():
    return "<html><body><h1>Old Page 3</h1></body></html>"
```

## Features

- **Visual Warning**: Adds a blinking red border around the page and a sticky warning banner
- **HTTP Headers**: Adds `Deprecation`, `X-Deprecated-Message`, and `Sunset` headers
- **Metadata**: Decorated functions get `_deprecated`, `_deprecated_message`, and `_deprecated_sunset` attributes

## License

MIT
