Questions tagged [bottle]

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.

Bottle

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

Bottle is designed for prototyping and building small web applications and services. It allows you to get things done quickly, but misses some of the advanced features and ready-to-use solutions found in other frameworks (such as MVC, ORM, form validation, scaffolding and XML-RPC).

Features

  • 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, gae, cherrypy or any other WSGI capable HTTP server.

Resources

1487 questions
-2
votes
2 answers

Handling an Angular HTTP Request with a Bottle Server CORS not allowed

I'm trying to submit data from my Angular 9 App to a bottle backend server. On the clientside I'm getting the CORS Errror, that a 'Access-Control-Allow-Origin' header is missing. Also it says that the same-origin rule is blocking the request. On the…
fonzane
  • 368
  • 1
  • 4
  • 16
-2
votes
1 answer

How to get all the names from all the tags from form with Bottle Python as dict?

Could you help me with the following question? How can I get all the names from all the tags form with the library Bottle on Python as a dict? Because actually the request.forms only provides me the last set of "names" from the HTML tags. Thanks.
-2
votes
1 answer

How do I send python lists to a bottle server?

I have a python file which has 4 python lists that gets basic information (ip, host, mac, signal) from devices connected to a rpi hotspot. I would like to send those lists from the Rpi to a bottle server constantly because that information can…
Alvaromr7
  • 25
  • 8
-2
votes
1 answer

How can I pass a list from another python file to my bottle server?

I'm struggling with passing a list from a python file to my bottle server. I have split them up into functions so that when you call it they should be printed. This what I have so far: from bottle import route, run, template, request import…
Alvaromr7
  • 25
  • 8
-2
votes
2 answers

What is the difference between 'return dict (result)' and 'return {"result": result}'?

Is there any difference in the following processing before passing it to template? def index(): # return dict(result=result) def index(): # return {"result":result}
re3
  • 11
  • 6
-2
votes
1 answer

How to format and display set inside a list in bottle's template?

current situation index_template.tpl {{links}} Output result [{'http://www.oreilly.com/careers/', 'http://www.oreilly.com/about/editorial_independence.html', 'https://cdn.oreillystatic.com/pdf/oreilly_high_performance_organizations_whitepaper.pdf',…
re3
  • 11
  • 6
-2
votes
1 answer

Python To JS Using JSON objects, decoding issue

I am currently working on a python bottle app and have built an array like the one below in Python. [{'text': 'aampm', 'size': 1}, {'text': 'absolutely', 'size': 1},... I added this to a json object using json.dumps() and then trying to pass the…
-2
votes
1 answer

I am trying to extract data from mongodb using bottle in python and use d3.js to visualize it: Mongodb-->Python-->d3.js

import bottle, pymongo from pymongo import MongoClient client = pymongo.MongoClient(some URI) db = client['database'] dbcoll = db['collection'] @bottle.route('/hello') def grab_record(name): …
glitterati
  • 133
  • 2
  • 16
-2
votes
1 answer

Error while installing bottle for python 2.7 on windows machine

I have installed python 2.7, pymongo 2.3 and setup tools for python 2.7 on my windows machine(32 bit). But while installing bottle, I am getting an error and the screenshot of which is attached here. Could you guys help me out solving this??
UserRA
  • 185
  • 1
  • 2
  • 16
-2
votes
1 answer

How to "select file" with a Python script in Google App Engine?

I'm trying to create an online application for a Python function I have created. In my script, I input the path of my file for the computer (input_path = '/users/user/desktop/input.txt') but I'm not sure how to go about this using Google App…
O.rka
  • 29,847
  • 68
  • 194
  • 309
-2
votes
1 answer

how to connect to google NoSQL database from bottle framework

I am running a bottle webservice in localhost in my system. I have connected it to the MySQL and it is working fine, but when it comes to googleappengine how can i connect to NoSQL. This is my code: import bottle import webapp2 from bottle import…
-3
votes
2 answers

HTML posted form data gets written as jibberish into MySQL database

When i try to enter data in a text field in Greek letters my wsgi script saves that data as jibberish in the MySQL database and i dont know why. Here is the relative code when the data is about to be posted via form method: pdata = pdata + '''
-3
votes
1 answer

base.tpl is not properly read by bottle

I have downloaded some sample tpl files from the internet, i wanted to customise menu on my site thus i was trying to create new base.tpl file. However when I have saved it bottle does not want to read it and and return that: bottle.TemplateError:…
mkropkowski
  • 107
  • 8
-4
votes
2 answers

Is it possible to use Bottle's/Flask's statement and functions from within a template?

I was wondering if i can use the static_file() from withing a template as follows: {{ static_file( filename, root=filepath, download=True ) }} Can it be written like that? And if can, then how i will be able to substitite the variables within the…
-5
votes
1 answer

Can a python file run on a Raspberry Pi?

I have developed a webserver in Python (using Bottle). In this moment it runs on my laptop, but in future it will run on a board (like Raspberry). The webserver shows a html page that allow to the users to put some data and it should save locally…
lucacatr
  • 101
  • 3
  • 12
1 2 3
99
100