Index Page
Index Page
1. Certificate
2. CO Address
3. Aim
4. Abstract
5. Introduction
6. Resources Used
7. Brief Description
8. Program Code
9. Output
10. Advantages and Disadvantages
11. Conclusion
13. References
Aim
To develop a Frug Destruction System that allows users
to manage and eliminate unwanted digital content
through a secure payment code mechanism.
Abstract
This project aims to create a Frug Destruction System
that efficiently allows users to handle unwanted files or
digital content through a payment-based approach. The
system integrates payment verification to ensure secure
transactions before executing deletion commands, thus
protecting users from unauthorized access and ensuring
accountability.
Introduction
In the digital age, managing data has become
increasingly important. Users often find themselves
dealing with unwanted files, which can clutter their
storage and compromise security. This project presents
a solution: the Frug Destruction System, which uses a
payment code to authorize file deletion. This not only
adds a layer of security but also allows users to have
control over what they wish to keep or remove.
Resources Used
version control
Brief Description
Program Code
Python
Copy code
import stripe
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] =
'sqlite:///frug.db'
db = SQLAlchemy(app)
stripe.api_key = 'your_secret_key'
class FileToDelete(db.Model):
id = db.Column(db.Integer,
primary_key=True)
filename = db.Column(db.String(100),
nullable=False)
@app.route('/upload', methods=['POST'])
def upload_file():
file = request.files['file']
new_file =
FileToDelete(filename=file.filename)
db.session.add(new_file)
db.session.commit()
return jsonify({'message': 'File uploaded
successfully!'})
@app.route('/pay', methods=['POST'])
def process_payment():
in cents
try:
charge = stripe.Charge.create(
amount=amount,
currency='usd',
deletion',
source=request.json['token']
)
except Exception as e:
@app.route('/delete/<int:file_id>',
methods=['DELETE'])
def delete_file(file_id):
file_to_delete =
FileToDelete.query.get_or_404(file_id)
db.session.delete(file_to_delete)
db.session.commit()
successfully!'})
if __name__ == '__main__':
app.run(debug=True)
Output
Advantages
Disadvantages
3. Dependence on Third-Party
Services: Relies on payment gateways
which may face outages.
Conclusion
Future Scope
References
1. Flask Documentation:
https://flask.palletsprojects.com/
2. SQLAlchemy Documentation:
https://docs.sqlalchemy.org/