Metadata-Version: 2.4
Name: lease-management-system
Version: 0.0.1
Summary: A Flask-based lease management system with AWS integration
Home-page: https://github.com/yourusername/lease-management-system
Author: Your Name
Author-email: kavyamunnangi5 <kavyamunnangi5@gmail.com>
License: MIT
Project-URL: Homepage, https://github.com/yourusername/lease-management-system
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Framework :: Flask
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: flask>=2.3.0
Requires-Dist: boto3>=1.26.0
Requires-Dist: python-dotenv>=1.0.0
Requires-Dist: werkzeug>=2.3.0
Dynamic: author
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-python

# Lease Management System Library

A Flask-based lease management system library with AWS integration for property owners to manage tenants, leases, and automated notifications.

## Features

- Property and tenant management
- Lease document upload with S3 storage
- Rent due date tracking
- Lease expiration monitoring
- Automated SNS notifications (5 days before rent due, 1 month before lease expiry)
- Lambda integration for lease expiry alerts

## Installation

```bash
pip install lease-management-system
```

## Quick Start

```python
from lease_management import create_app

app = create_app()
app.run(debug=True)
```

## Configuration

Set the following environment variables:

```
AWS_REGION=us-east-1
AWS_ACCESS_KEY_ID=your_access_key
AWS_SECRET_ACCESS_KEY=your_secret_key
DYNAMODB_TABLE_PROPERTIES=properties
DYNAMODB_TABLE_TENANTS=tenants
DYNAMODB_TABLE_LEASES=leases
S3_BUCKET_NAME=lease-documents
SNS_TOPIC_ARN=arn:aws:sns:region:account:lease-notifications
```

## API Endpoints

- `POST /api/properties` - Add property
- `POST /api/tenants` - Add tenant
- `POST /api/leases` - Create lease with document upload
- `GET /api/leases/<lease_id>` - Get lease details
- `GET /api/leases/<lease_id>/document` - Get presigned URL for lease document
- `GET /api/leases` - List all leases

## AWS Architecture

The system uses the following AWS services:

- DynamoDB: Three tables (properties, tenants, leases)
- S3: Lease document storage with presigned URLs
- SNS: Notification delivery
- Lambda: Automated lease expiry checks (triggered daily via CloudWatch Events)

## Publishing to PyPI

See [PYPI_PUBLISH.md](PYPI_PUBLISH.md) for detailed instructions.

Quick steps:
```bash
pip install build twine
python -m build
python -m twine upload dist/*
```

## License

MIT
