A framework for writing RESTful APIs with WebApp2 on Google App Engine in Python with out of the box support for user management, and an included helper script to get everything set up.
/ProjectName
/project-id
/lib
/ProjectName
/Handlers
/Models
__init__.py
Errors.py
/.git
Rename me to .gitignore
app.yaml
appengine_config.py
favicon.ico
index.yaml
main.py
Coming soon! For now, try to figure it out!
Assuming you've built many apps on app engine and google cloud platform, this should be pretty self explanitory! If you need help, shoot me an email.
- Create a new project in Google Cloud Platform, then set up App Engine within that project. Take note of the
Project id
. - Create a Cloud SQL Instance within the project as well. Take note of the
Instance id
and theRoot password
that you choose during setup. You can chose any location, but I recommend chosing one central to your users. When setup is completed, take note of theInstance connection name
of your new instance. - When you see that setup is complete, click on the instance id, and go to Databases. Create a new database and name it the name of your project.
- Next go to Authorization and add your home network so you can connect to the database from home.
- Make sure you have Google App Engine launcher installed on your machine, with the python 2.7 runtime.
- Download and install a program like MAMP to run a MySQL server locally.
- Install an SQL browser, like Sequel Pro (included in MAMP).
- Create a new database locally, and name it the name of your Project
- Make sure the user and password are both root (important!).
- Git clone this repository wherever you want your project to live on your machine. Take note of the newly created SparkPlug folder and
cd
into it.
Structure:
SparkPlug
/.git
/PROJECT_ID
/setup.py
/README.md
- Run
python setup.py
and answer all the questions. Don't fuck up, because there's no way to edit yet [you'll need to start over]. You'll notice that the project folder changed from SparkPlug to the name of your project. You'll also notice that the git repository has been deleted.
New Structure:
SparkPlug
/project-id
-
Rename the
SpakPlug
directory to your project name, then using the Google App Engine Launcher, go toFile > Add Existing Application
and add the path of the folder named yourproject id
. This is not the parent folder, it's the child one. -
Rename the .gitignore file, initialize a
git
repo in the child folder and you're good to go =).
That's it! If you need any help feel free to shoot me an email. jakemny@gmail.com.