Metadata-Version: 2.4
Name: yajvendra-prac6
Version: 0.1.0
Summary: Practical 6: Persistent database-backed blogging API backend with CRUD operations
Author-email: Yajvendra <yajvendra@example.com>
Keywords: fastapi,pydantic,api,crud,sqlalchemy,database,practical6
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: fastapi>=0.100.0
Requires-Dist: pydantic>=2.0.0
Requires-Dist: sqlalchemy>=2.0.0
Requires-Dist: uvicorn>=0.20.0

# Practical 6: Database-Backed Blogging API Backend (Transactional CRUD)

This package implements **Practical 6**:
> *Building a persistent database-backed blogging or e-commerce API backend to perform automated transactional CRUD operations.*

---

## 🚀 How to Install on Any Machine via Pip

```bash
pip install yajvendra-prac6
```

---

## ⚡ How to Get and Use the Code on Any System

### 1. Export the Complete Practical Code File (Recommended)
Run:
```bash
prac6 --get
```
or simply:
```bash
prac6 get
```
This instantly generates `practical6_blog_api.py` in your current working directory!

### 2. Run Automated Transactional CRUD Tests
```bash
prac6
```
This runs automated tests demonstrating:
- Post Creation (CREATE)
- Querying Posts (READ)
- Atomic Updates (UPDATE)
- ACID Rollback Verification (Simulating error & verifying rollback)
- Post Deletion (DELETE)

### 3. Start Live API Server
```bash
prac6 --server
```
Launches the REST API backend on `http://127.0.0.1:5000`.

### 4. Print Full Source Code to Terminal
```bash
prac6 --show
```

---

## 🛠️ How to Build and Upload to PyPI

1. **Navigate to this folder:**
   ```bash
   cd practical6_blog_api_crud
   ```

2. **Build the package:**
   ```bash
   python -m build
   ```

3. **Upload to PyPI:**
   ```bash
   twine upload dist/*
   ```
