Skip to content

RadW2020/python-art-sentiments-twitter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Art Sentiments Twitter

This is a sample application showing how to deploy a simple Flask-based hello world app using Cloud Foundry and the Python buildpack.

Deploy to Bluemix

Bluemix Deployments

Running the app on Bluemix

  1. If you do not already have a Bluemix account, sign up here

  2. Download and install the Cloud Foundry CLI tool

  3. Clone the app to your local environment from your terminal using the following command:

  4. cd into this newly created directory

  5. Connect to Bluemix in the command line tool and follow the prompts to log in.

$ cf api https://api.ng.bluemix.net
$ cf login
  1. Push the app to Bluemix.
$ cf push

And voila! You now have your very own instance of the Python Hello World sample app running on Bluemix.

Run the app locally

  1. If you do not already have a Bluemix account, sign up here

  2. If you have not already, download Python and install it on your local machine. There are a number of best practices for developing locally with Python and we will leave the excersice of learning those up to you.

  3. Clone the app to your local environment from your terminal using the following command:

  4. cd into this newly created directory

  5. Create a new virtual environment with virtualenv and activate

$ virtualenv venv
$ source venv/bin/activate
  1. Install the dependencies with pip
$ pip install -r requirements.txt
  1. Start your app locally with the following command
$ python hello.py

This command will create a new Flask app and start your application. When your app has started, your console will print that your Running on http://0.0.0.0:8080/ (Press CTRL+C to quit).

For more detailed information on troubleshooting your application, see the Troubleshooting section in the Bluemix documentation.

Contribute

We are more than happy to accept external contributions to this project, be it in the form of issues and pull requests. If you find a bug, please report it via the Issues section or even better, fork the project and submit a pull request with your fix! Pull requests will be evaulated on an individual basis based on value add to the sample application.

Privacy Notice

The hello-world-flask sample web application includes code to track deployments to Bluemix and other Cloud Foundry platforms. The following information is sent to a Deployment Tracker service on each deployment:

  • Python package version
  • Python repository URL
  • Application Name (application_name)
  • Space ID (space_id)
  • Application Version (application_version)
  • Application URIs (application_uris)
  • Labels of bound services
  • Number of instances for each bound service and associated plan information

This data is collected from the setup.py file in the sample application and the VCAP_APPLICATION and VCAP_SERVICES environment variables in IBM Bluemix and other Cloud Foundry platforms. This data is used by IBM to track metrics around deployments of sample applications to IBM Bluemix to measure the usefulness of our examples, so that we can continuously improve the content we offer to you. Only deployments of sample applications that include code to ping the Deployment Tracker service will be tracked.

Disabling Deployment Tracking

Deployment tracking can be disabled by removing cf_deployment_tracker.track() from the hello.py file.

License

This app is covered by the Apache 2.0 license. For more information, see License.txt for license information.

About

Bluemix Watson sentiment twitter analysis

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published