background preloader

The Flask Mega-Tutorial, Part I: Hello, World!

The Flask Mega-Tutorial, Part I: Hello, World!
This is the first article in a series where I will be documenting my experience writing web applications in Python using the Flask microframework. NOTE: This article was revised in September 2014 to be in sync with current versions of Python and Flask. Here is an index of all the articles in the series that have been published to date: My background I'm a software engineer with double digit years of experience developing complex applications in several languages. I first learned Python as part of an effort to create bindings for a C++ library at work. In addition to Python, I've written web apps in PHP, Ruby, Smalltalk and believe it or not, also in C++. UPDATE: I have written a book titled "Flask Web Development", published in 2014 by O'Reilly Media. The application The application I'm going to develop as part of this tutorial is a decently featured microblogging server that I decided to call microblog. These are some of the topics I will cover as we make progress with this project: #! .

Related:  Python Flask Web MappingApi'spythonTut / GuidesSoftware Dev

How I Structure My Flask Applications June 26, 2013 How I Structure My Flask Applications Flask has been my preferred web framework as of late. Implementing a RESTful Web API with Python & Flask Example Code Hacker News Discussion Introduction To begin: sudo pip install flask I'm assuming you already know the basics of REST. Designing a RESTful API with Python and Flask In recent years REST (REpresentational State Transfer) has emerged as the standard architectural design for web services and web APIs. In this article I'm going to show you how easy it is to create a RESTful web service using Python and the Flask microframework. What is REST?

Raspberry PI: Bottlepy and Twitter Bootstrap I have been using my Raspberry Pi for the last few months quite a lot. I am currently working on a temperature/environment monitor that logs temperature, using a DS18B20, and light conditions using an optical sensor. I also have two LED's and two buttons to test basic input and output. I am developing the application in python using the BottlePy framework. I chose the BottlePy framework as it is a single file that you add, it is very small and it works with Python 3. To control my GPIO's, I am using the Quick2Wire library. Modern OpenGL tutorial (python) This tutorial is part of the vispy project which is an OpenGL-based interactive visualization library in Python. During this tutorial, only the vispy low-level interface (named gloo) will be used. A stand-alone gloo package is distributed along this tutorial but you should use the vispy.gloo package from the latest vispy distribution which is more up-to-date. Before diving into the core tutorial, it is important to understand that OpenGL has evolved over the years and a big change occured in 2003 with the introduction of the dynamic pipeline (OpenGL 2.0), i.e. the use of shaders that allow to have direct access to the GPU. Note

GeoAlchemy 2 Documentation — GeoAlchemy2 0.2.4 documentation Using SQLAlchemy with Spatial Databases. GeoAlchemy 2 provides extensions to SQLAlchemy for working with spatial databases. GeoAlchemy 2 focuses on PostGIS. PostGIS 1.5 and PostGIS 2 are supported. Note Designing a RESTful Web API Hacker News Discussion Purpose, Scope, Miscellaneous I decided to write this article to serve as my personal "quick start guide" for designing RESTful Web APIs. As such, this document is concerned with the how rather than the why.

Install Python 2.7, virtualenv and virtualenvwrapper on OS X This post explains how to install a clean version of Python in a Mac OS X Mavericks/Yosemite. You’ll also learn to install and use the virtualenv and virtualenvwrapper tools to create virtual environments for your projects. Install Xcode and Homebrew First of all, install Xcode if you don’t have it already. You can find it in the Apple Store. Next, we need to install the Command Line Tools of Xcode. An Introduction to Python's Flask Framework Flask is a small and powerful web framework for Python. It's easy to learn and simple to use, enabling you to build your web app in a short amount of time. In this article, I'll show you how to build a simple website, containing two static pages with a small amount of dynamic content. While Flask can be used for building complex, database-driven websites, starting with mostly static pages will be useful to introduce a workflow, which we can then generalize to make more complex pages in the future. Upon completion, you'll be able to use this sequence of steps to jumpstart your next Flask app. Before getting started, we need to install Flask.

Learning WebGL A year ago, at a biggest-ever, record-breaking HTML5 Meetup in San Francisco all about WebGL, I predicted we were a tipping point; I think I was right. Let’s take a look at 2014, a banner year for 3D on the web! A Year of Great Content John Cale and Liam Young’s City of Drones brought together experiments in music and architecture; Isaac Cohen continued to blow minds with visualizations like Weird Kids and Webby; Google’s A Spacecraft for All chronicled the 36-year journey of the ISEE-3 space probe; and SKAZKA showed us an alternate world created by The Mill and powered by Goo. A Year of Killer Apps In 2014, WebGL made its mark– an indelible impression– on advertising, e-commerce, music, news and engineering.

AJAX with jQuery — Flask Documentation (0.10) jQuery is a small JavaScript library commonly used to simplify working with the DOM and JavaScript in general. It is the perfect tool to make web applications more dynamic by exchanging JSON between server and client. JSON itself is a very lightweight transport format, very similar to how Python primitives (numbers, strings, dicts and lists) look like which is widely supported and very easy to parse.