nyu-devops / lab-bluemix-cf Goto Github PK
View Code? Open in Web Editor NEWThis repo demonstrates how deploy a simple Python Flask RESTful service using Bluemix Cloud Foundry
License: Apache License 2.0
This repo demonstrates how deploy a simple Python Flask RESTful service using Bluemix Cloud Foundry
License: Apache License 2.0
Describe the problem
Discovered at the end of the January 2023, rebuilding the docker image then flask run will produce the following error:
AttributeError: module 'sqlalchemy' has no attribute 'all'
To Reproduce
Steps to reproduce the behavior:
Additional context
I found the fix on stack overflow: https://stackoverflow.com/questions/75275563/attributeerror-module-sqlalchemy-has-no-attribute-all-in-github-actions
I think this error occurs because SQLAlchemy has made some updates. I fixed it locally by changing the corresponding Flask and SQLAlchemy version in my requirements.txt
My solution : I basically upgraded everything and it worked again, with some warnings. I think we can downgrade versions to make it compatible too? (didn't test it)
# Werkzeug keeps breaking Flask!
Werkzeug==2.2.2
# Runtime dependencies
Flask==2.2.2
Flask-SQLAlchemy==3.0.3
As an Instructor
I need to teach my students several approaches to solving problems
So that they have a rich set of architectural blueprints to choose from
Assumptions:
Acceptance Criteria:
Given we have a project that uses traditional Flask
When I convert it to use Flask-RESTful
Then students will have another way of structuring their REST API microservices
When using Docker as the Vagrant provider, there will be an error during Installing IBM Cloud CLI
at wget -O bluemix-cli.tar.gz https://clis.cloud.ibm.com/download/bluemix-cli/1.4.0/linux64
default: ************************************
default: Installing IBM Cloud CLI...
default: ************************************
default:
default: sh: 2: wget: not found
Seems like the rofrano/vagrant-provider:debian
image lacks wget
.
Adding wget
at the end of
apt-get install -y git vim tree python3 python3-pip python3-venv
in Vagrantfile solves this problem.
Or simply change the docker image to rofrano/vagrant-provider:ubuntu
also works.
As an Instructor
I need to use Cloud resources that are free for my students
So that they don't incur any expenses to take my class
Assumptions:
Acceptance Criteria:
When I deploy my application into IBM Cloud
Then I can connect to a NoSQL database in the cloud
And that database must be free of charges
The update method doesn't set the id after it pulls in the new data from the payload. It should reset the id
to match the id
on the URL.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.