Requirements:
You must have Python installed. Check to see if you have Python installed from the commandline:
python --version
Table of Contents:
- Create a Starterapp
- Git Clone and Setup
- Create Additional Folders and Files
- Commit and Push Changes to Repository, Build and Deploy
- Create an AlchemyAPI service
- Create a Cloudant NoSQL service
- Add the Basic Workflow for Request-Response
- Get News using AlchemyAPI
- Create Helper Functions
- Save Responses in Cloudant
- Parse Response for D3js
- Draw the Line Chart in D3js
You can import AlchemyAPI requests into Postman with this Postman collection.
The source code for the application can be viewed or cloned from Github.
1. Create a Starterapp
- Go to Catalog > Boilerplates
- Click the ‘Python Flask’ starterapp
- For name enter <username>-newssentiment
- Go to Overview
- Under ‘Continuous Integration’ click ‘Add GIT Repo and Pipeline’ to add a DevOps platform, select ‘Populate the repo with the starterapp packageand enable Build & Deploy pipeline’ > Click Continue > Click ‘CLOSE’.
- Click ‘EDIT CODE’.
- The very first time you login to the ‘DevOps’ environment you will need to pick a username for the ‘DevOps’ environment.
- In the left menu of icons, click the top folder icon, and click ‘Git URL’ to copy the Git repository url.
- If you prefer to edit in the online editor in Bluemix, click ‘EDIT CODE’ button and then click the second pencil icon in the left menu of icons.
- I will continue to work on localhost instead.