-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
23 lines (19 loc) · 917 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
from flask import Flask
from flask_restful import Api
from resources.transaction import Transaction
from resources.transactionfilter import TransactionFilter
from resources.summarybyproducts import SummaryByProducts
from resources.summarybymanufacturingcity import SummaryByManufacturingCity
from resources.product import Product
app = Flask(__name__)
api = Api(app)
api.add_resource(Transaction, '/assignment/transaction')
api.add_resource(TransactionFilter, '/assignment/transaction/<int:transaction_id>')
api.add_resource(SummaryByProducts, '/assignment/transactionsummarybyproducts/<int:last_n_days>')
api.add_resource(SummaryByManufacturingCity, "/assignment/transactionsummarybymanufacturingcity/<int:last_n_days>")
api.add_resource(Product, '/assignment/product')
@app.route("/")
def home():
return "Welcome to Rest API Page!!!"
if __name__ == "__main__":
app.run(debug=True)