Skip to content

[feature]: Add Flask + SQLite Sample App with Keploy Integration #2798 #62

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

eatulrajput
Copy link

@eatulrajput eatulrajput commented Jun 19, 2025

[feature]: Add Flask + SQLite Sample App with Keploy Integration - #2798

Issue : keploy/keploy#2798

This PR adds a new sample application that demonstrates how to use Flask with SQLite and integrate it with Keploy for API testing.

Features:
CRUD APIs for managing student data

Uses SQLite (no external DB setup needed)

Built with Flask and Flask-SQLAlchemy

@Copilot Copilot AI review requested due to automatic review settings June 19, 2025 05:09
Copilot

This comment was marked as outdated.

Copilot

This comment was marked as outdated.

Copilot

This comment was marked as outdated.

@eatulrajput eatulrajput requested a review from Copilot June 19, 2025 06:04
Copilot

This comment was marked as outdated.

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds a sample Flask + SQLite application with full CRUD operations for student data and integrates Keploy to auto-generate and replay API tests.

  • Introduces Flask app (app.py) and SQLAlchemy model (models.py) with helper validation.
  • Adds Keploy configuration and auto-generated HTTP test cases for GET and POST endpoints.
  • Provides setup docs, dependencies, ignore rules, and coverage settings.

Reviewed Changes

Copilot reviewed 14 out of 15 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
requirements.txt Lists framework dependencies
models.py Defines Student model and initializes db
app.py Implements CRUD routes with input validation
flask-sqlite/keploy/test-set-0/*.yaml Auto-generated Keploy HTTP test specifications
flask-sqlite/keploy.yml Keploy configuration for recording and testing
flask-sqlite/.gitignore Ignores build artifacts, DB files, and logs
flask-sqlite/.coveragerc Coverage tool configuration
README.md Setup instructions and API documentation
Comments suppressed due to low confidence (2)

flask-sqlite/requirements.txt:2

  • The PyPI package name uses a hyphen, not an underscore. Change to Flask-SQLAlchemy==3.1.1 to ensure it installs correctly.
Flask_SQLAlchemy==3.1.1

flask-sqlite/app.py:54

  • There are no Keploy tests covering the PUT /students/<id> and DELETE /students/<id> endpoints. Consider adding recordings for update and delete operations to ensure full coverage.
@app.route('/students/<int:id>', methods=['PUT'])

self: s1
inCi: false

# Visit [https://keploy.io/docs/running-keploy/configuration-file/] to learn about using keploy through configration file.
Copy link
Preview

Copilot AI Jun 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a typo in the comment: configration should be configuration.

Suggested change
# Visit [https://keploy.io/docs/running-keploy/configuration-file/] to learn about using keploy through configration file.
# Visit [https://keploy.io/docs/running-keploy/configuration-file/] to learn about using keploy through configuration file.

Copilot uses AI. Check for mistakes.

Signed-off-by: Atul Rajput <[email protected]>
Signed-off-by: Atul Rajput <[email protected]>
Signed-off-by: Atul Rajput <[email protected]>
@pratik-mahalle
Copy link

Hey @eatulrajput, Thank you for raising the pr. Our team will review the pr soon

pratik-mahalle

This comment was marked as outdated.

Copy link

@pratik-mahalle pratik-mahalle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @eatulrajput, This is a great use case! Can you please share the screenshot or recording if you have so that we will get the better view of it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants