Metadata-Version: 2.4
Name: eventbooking-cloud
Version: 0.1.0
Summary: Reusable AWS cloud workflow helpers for event booking applications.
Author: Lakshmi
License-Expression: MIT
Project-URL: Homepage, https://pypi.org/project/eventbooking-cloud/
Project-URL: Repository, https://github.com/lakshmikalavathi2004/cpp-project
Keywords: aws,event-booking,dynamodb,sqs,sns,lambda,s3
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: boto3>=1.28
Dynamic: license-file

# eventbooking-cloud

`eventbooking-cloud` is a reusable Python library extracted from this project's AWS booking workflow. It helps applications coordinate the same core cloud services used in the app:

- `DynamoDB` for booking records
- `SQS` for queueing booking jobs
- `AWS Lambda` for booking processing
- `SNS` for email notifications
- `S3` for ticket storage

## Installation

```bash
pip install eventbooking-cloud
```

## What the library provides

- A `BookingRequest` model for normalized booking input
- A `BookingResult` model for normalized booking output
- An `EventBookingCloudClient` class for:
  - saving booking records to DynamoDB
  - sending booking messages to SQS
  - subscribing user emails to SNS
  - invoking a booking Lambda function
  - building a safe app ticket URL

## Example

```python
from eventbooking_cloud import BookingRequest, EventBookingCloudClient

client = EventBookingCloudClient(
    region_name="us-east-1",
    users_table="Users",
    events_table="Events",
    bookings_table="Bookings",
    bucket_name="elasticbeanstalk-us-east-1-864148790210",
    queue_name="BookingQueue",
    topic_name="EventNotifications",
    lambda_name="event-booking-processor",
    app_base_url="https://example.com",
)

request = BookingRequest(
    booking_id="booking-123",
    event_id="event-456",
    event_name="Kala Events",
    username="lakshmi",
    email="lakshmi@example.com",
    ticket_access_token="secure-token",
    booked_at="2026-04-15T08:00:00+00:00",
)

client.store_booking(request)
client.enqueue_booking(request)
client.subscribe_email(request.email)
result = client.invoke_processor(request)

print(result.ticket_url)
```

## Build for PyPI

From the project root:

```bash
python -m pip install --upgrade build twine
python -m build
python -m twine check dist/*
```

This creates:

- `dist/*.tar.gz`
- `dist/*.whl`

## Upload to TestPyPI

```bash
python -m twine upload --repository testpypi dist/*
```

## Upload to PyPI

```bash
python -m twine upload dist/*
```

## Recommended PyPI checklist

- Create a PyPI account
- Create a TestPyPI account
- Generate an API token
- Use the API token with `twine`
- Verify the package page after upload

## Notes for your viva

You can explain that the app itself is a Flask project, but the reusable AWS cloud workflow was separated into a Python package so the same booking logic can be reused in other projects and published through PyPI.
