This project demonstrates a simple microservice built with Python using Flask. It implements endpoints for accessing both SQL and NoSQL databases and includes a security check endpoint.
- Get RDBMS data: Retrieve data from a sample RDBMS (SQLite).
- Get NoSQL data: Retrieve data from a sample MongoDB collection.
- Security Check: A POST endpoint that simulates a security check for provided input.
- Python 3.x
- pip (Python package installer)
- SQLite3 (for RDBMS)
- MongoDB (for NoSQL)
git clone <repository-url>
cd amplify-security-project
pip install -r requirements.txt
- For SQLite: Run the SQL setup file to create the required table:
sqlite3 example.db < setup.sql
- For MongoDB: Make sure MongoDB server is running and create a database and collection.
python app.py
You can use a tool like Postman or CURL to test the endpoints:
- RDBMS Data:
GET http://127.0.0.1:5000/api/rdbms/data
- NoSQL Data:
GET http://127.0.0.1:5000/api/nosql/data
- Security Check:
POST http://127.0.0.1:5000/api/security/check
- Ensure you have appropriate permissions set for your database and application.
- Feel free to reach out for further documentation or clarifications.
This project is licensed under the MIT License - see the LICENSE file for details.