https://github.com/Sayantanmukherjee6/FlaskAPI-for-PowerBI
A simple Python based Flask API for PowerBI.
https://github.com/Sayantanmukherjee6/FlaskAPI-for-PowerBI
Last synced: 5 months ago
JSON representation
A simple Python based Flask API for PowerBI.
- Host: GitHub
- URL: https://github.com/Sayantanmukherjee6/FlaskAPI-for-PowerBI
- Owner: Sayantanmukherjee6
- Created: 2018-01-07T15:59:43.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-01-07T16:14:20.000Z (over 7 years ago)
- Last Synced: 2024-08-09T02:15:00.115Z (8 months ago)
- Language: JavaScript
- Size: 43 KB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- jimsghstars - Sayantanmukherjee6/FlaskAPI-for-PowerBI - A simple Python based Flask API for PowerBI. (JavaScript)
README
FlaskAPI-for-PowerBI
A simple Python based Flask API for embedding PowerBI in web application.
The API currently uses SQL SERVER. You may use it for any other database.
Please follow the steps below to use the api.1.Client application sends a request to the Flask API.
2.API sends back the reportid and embeddedtoken which will be used by powerbi.js file for report embedding.
3.Client sends the data based on which the current dataset will change and report will be generated.
Simple Django Based View as a Client :def bidemo(request):
r=requests.post('http://127.0.0.1:5000/token', data = {'key1':'sendToken'})
a=json.loads(str(r.text))
selectedReport=a['selectedReport']
embedToken=a['embedToken']
if request.method == 'POST':
form=UserForm(request.POST)
if form.is_valid():
dist=request.POST.get('distributor','')
r=requests.post('http://127.0.0.1:5000/api', data = {'key2':dist})
print r.text
else:
form=UserForm()
return render(request, 'registration/bidemo.html', {'form':form,'selectedReport': selectedReport,