{ "info": { "author": "Leo G", "author_email": "leo@techarena51.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Software Development :: Build Tools" ], "description": "Flask-Scaffold let's you scaffold a MySQL or PostgreSQL driven Web Application with Flask and Angularjs. It will create views,models and templates for a given Resource along with API endpoints and Unit tests.\n\n![](http://i.imgur.com/gsOwlH5.png)\n\nFeatures include\n\n - Python 3 Support\n - RESTFUL JSON API\n - Unit Testing with python Unit tests\n - End 2 End testing with Protractor\n - Continous Integration with Travis-CI\n\n![](https://travis-ci.org/Leo-G/Flask-Scaffold.svg?branch=master)\n[![Gitter](https://badges.gitter.im/Leo-G/Flask-Scaffold.svg)](https://gitter.im/Leo-G/Flask-Scaffold?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n\n###Installation\n\nPlease ensure that development libraries for [PostgreSQL](http://techarena51.com/index.php/flask-sqlalchemy-postgresql-tutorial/) are installed.\n\n####Step 1:Clone the project to your application folder.\n\n git clone git@github.com:Leo-g/Flask-Scaffold.git YourAppFolderName && cd YourAppFolderName\n\n####Step 2: Install the requirements and add your Database configuration details.\n\n pip install -r requirements.txt\n\n vim config.py\n #Fill in your database username, password, name, host etc\n\n#### Step 3 : Declare your Resource and it's fields in a YAML file as follows\n\nFor a list of supported fields please see https://github.com/Leo-g/Flask-Scaffold/wiki/Fields\n\n vim scaffold/blog.yaml\n posts:\n - title:string\n - body:text\n - author:string\n - creation_date:date\n - published:boolean\n comments:\n - author:string\n - body:text\n - author_url:url\n - created_on:date\n - approved:boolean\n authors:\n - name:string\n - profile:text\n - url:url\n\n#### Step 4 : Run the Scaffolding and database migrations script\n\n python scaffold.py scaffold/blog.yaml\n python db.py db init\n python db.py db migrate\n python db.py db upgrade\n\n#### Step 5 : Run the Server\n\n python run.py\n\n**You should be able to see the web dashboard at http://localhost:5000\n\n![](http://i.imgur.com/gsOwlH5.png)\n\nTo configure your application with nginx and uwsgi configuration see the [wiki](https://github.com/Leo-G/Flask-Scaffold/wiki/Install-and-Configure-Nginx-and-Uwsgi-on-Ubuntu-to-Serve-Flask-and-Angularjs-Applications)\n###Tests\n\n####For E2E testing with protractor\nInstallation instructions for protractor are in the [wiki](https://github.com/Leo-G/Flask-Scaffold/wiki/Headless-Testing-Angularjs-apps-with-Protractor-and-Selenium-on-Ubuntu-14.04)\n\n protractor angularjs//conf.js\n\n####For unit testing with python Unit tests\n\n python app//test_.py\n\n####For testing multiple modules\n bash tests.bash\n\n###API\n\nAPI calls can be made to the following URL\n\nNote: This example is for a Post module\n\n| HTTP Method | URL | Results |\n| :------------ |:---------------:| -----:|\n| GET | http://localhost:5000/api/v1/posts.json | Returns a list of all Posts |\n| POST | http://localhost:5000/api/v1/posts.json | Creates a New Post |\n| GET | http://localhost:5000/api/v1/posts/1.json | Returns details for the a single Post |\n| PATCH | http://localhost:5000/api/v1/posts/1.json | Update a Post |\n| DELETE | http://localhost:8001/api/v1/posts/1.json | Delete a Post |\n\n\nThe JSON format follows the spec at jsonapi.org and a sample is available in the sample.json file\n\nFor details on how the API is built read http://techarena51.com/index.php/buidling-a-database-driven-restful-json-api-in-python-3-with-flask-flask-restful-and-sqlalchemy/\n\n###Directory Structure\n Project-Folder\n |-- config.py\n |--run.py\n |--requirements.txt\n |__ /venv\n |-- db.py\n |__ /scaffold\n |-- scaffold.py\n |-- tests.bash #Tests for all modules\n |__ app/\n |-- __init__.py\n +-- module-1\n |-- __init__.py\n |-- models.py\n |-- test_module-1.py # Unit Tests for module 1\n |-- views.py\n \u00a0\u00a0\n +-- module-2\n |-- __init__.py\n |-- models.py\n |-- test_module-2.py # Unit Tests for module 2\n |-- views.py\n |__ templates\n |-- index.html\n +-- static\n |-- js\n |-- css\n |-- images\n +-- module-1\n \u00a0\u00a0 |-- _form.html\n \u00a0\u00a0 |-- index.html\n \u00a0\u00a0 |-- add.html\n \u00a0\u00a0 |-- update.html\n |-- controller.js\n \u00a0\u00a0 +-- module-2\n \u00a0\u00a0 |-- _form.html\n \u00a0\u00a0 |-- index.html\n \u00a0\u00a0 |-- add.html\n \u00a0\u00a0 |-- update.html\n |-- controller.js", "description_content_type": null, "docs_url": null, "download_url": null, "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Leo-G/Flask-Scaffold", "keywords": "Flask Database Web", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "Flask-Scaffold", "package_url": "https://pypi.org/project/Flask-Scaffold/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/Flask-Scaffold/", "project_urls": { "Homepage": "https://github.com/Leo-G/Flask-Scaffold" }, "release_url": "https://pypi.org/project/Flask-Scaffold/0.5.1/", "requires_dist": null, "requires_python": null, "summary": "Scaffold Database Applications in MySQL or PostgreSQL with Flask", "version": "0.5.1" }, "last_serial": 1886360, "releases": { "0.5.1": [ { "comment_text": "", "digests": { "md5": "41bc78d42745ff86204d58229e62c43e", "sha256": "3ebf3d2ed566ede15896768eb390d0d0a39fdd020d88f6dba560a6161295f425" }, "downloads": -1, "filename": "Flask-Scaffold-0.5.1.tar.gz", "has_sig": false, "md5_digest": "41bc78d42745ff86204d58229e62c43e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3466696, "upload_time": "2016-01-03T15:34:48", "url": "https://files.pythonhosted.org/packages/7f/1e/55385235baedbc5c21ada021b0570519f7ee24d3f5a2748cbfd0f85a68a6/Flask-Scaffold-0.5.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "41bc78d42745ff86204d58229e62c43e", "sha256": "3ebf3d2ed566ede15896768eb390d0d0a39fdd020d88f6dba560a6161295f425" }, "downloads": -1, "filename": "Flask-Scaffold-0.5.1.tar.gz", "has_sig": false, "md5_digest": "41bc78d42745ff86204d58229e62c43e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3466696, "upload_time": "2016-01-03T15:34:48", "url": "https://files.pythonhosted.org/packages/7f/1e/55385235baedbc5c21ada021b0570519f7ee24d3f5a2748cbfd0f85a68a6/Flask-Scaffold-0.5.1.tar.gz" } ] }