Coder Social home page Coder Social logo

franksun0634 / bottle Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bottlepy/bottle

0.0 2.0 0.0 7.53 MB

bottle.py is a fast and simple micro-framework for python web-applications.

Home Page: http://bottlepy.org/

License: MIT License

Makefile 0.63% Python 98.68% Shell 0.49% Smarty 0.20%

bottle's Introduction

Bottle Logo

Bottle Build

Downloads

Latest Version

License

Bottle: Python Web Framework

Bottle is a fast, simple and lightweight WSGI micro web-framework for Python. It is distributed as a single file module and has no dependencies other than the Python Standard Library.

  • Routing: Requests to function-call mapping with support for clean and dynamic URLs.
  • Templates: Fast and pythonic *built-in template engine* and support for mako, jinja2 and cheetah templates.
  • Utilities: Convenient access to form data, file uploads, cookies, headers and other HTTP-related metadata.
  • Server: Built-in HTTP development server and support for paste, fapws3, bjoern, Google App Engine, cherrypy or any other WSGI capable HTTP server.

Homepage and documentation: http://bottlepy.org

Example: "Hello World" in a bottle

from bottle import route, run, template

@route('/hello/<name>')
def index(name):
    return template('<b>Hello {{name}}</b>!', name=name)

run(host='localhost', port=8080)

Run this script or paste it into a Python console, then point your browser to http://localhost:8080/hello/world. That's it.

Download and Install

Install the latest stable release with pip install bottle, easy_install -U bottle or download bottle.py (unstable) into your project directory. There are no hard dependencies other than the Python standard library. Bottle runs with Python 2.6+ and 3.2+.

License

Code and documentation are available according to the MIT License (see LICENSE).

The Bottle logo however is NOT covered by that license. It is allowed to use the logo as a link to the bottle homepage or in direct context with the unmodified library. In all other cases please ask first.

bottle's People

Contributors

avelino avatar babs avatar bystroushaak avatar cassiobotaro avatar ckreutzer avatar ctengiz avatar davidwtbuxton avatar defnull avatar eric-wieser avatar ericfrederich avatar federicoceratto avatar foxx avatar fredj avatar gabeio avatar graingert avatar ifduyue avatar iurisilvio avatar jonashaag avatar little-arhat avatar mengzhuo avatar michael-k avatar mineo avatar myzhan avatar nayuki avatar sc68cal avatar sgala avatar vaultah avatar wbond avatar wobsta avatar ziadsawalha avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.