This is a (very) simple Flask application that shows how the built-in Python buildpack detection on Cloud Foundry works.
To push to Cloud Foundry, log in and then use
$ cf push myapp-name
e |
from io import StringIO | |
import requests | |
import pandas as pd | |
r = requests.get("https://www.plants.usda.gov/java/downloadData?fileName=plantlst.txt&static=true").text | |
df = pd.read_csv(StringIO(r)) | |
print(df) | |
while True: | |
pass | |
exit(0) |
## PyData stack on Cloud Foundry | |
The current Python buildpack uses `pip` to install dependencies. Anyone who has tried to install NumPy or SciPy using `pip` knows that the process can be lengthy and painful often requiring manual intervention to correct library paths and install Fortran compilers. | |
Fortunately [Continuum Analytics'](http://continuum.io/) [conda package manager](conda.pydata.org) was created to solve these problems by packaging and distributing the standard tools of the Python data stack in compiled binaries. | |
I wanted to build web apps on Cloud Foundry using the PyData stack so with help from [a colleague](https://github.com/nebhale) I have written a [Cloud Foundry buildpack](https://github.com/ihuston/python-conda-buildpack) which uses both conda and pip to install required packages. | |
You can specify packages to be installed by `conda` in the `conda_requirements.txt` file and these will be installed first, followed by packages in the `requirements.txt` which will be installed as usual by `pi |
This is a (very) simple Flask application that shows how the built-in Python buildpack detection on Cloud Foundry works.
To push to Cloud Foundry, log in and then use
$ cf push myapp-name