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

1464 questions
-1
votes
1 answer

Using a bottle API on python causes an error when passing arguments into functions

I'm writing an API in python using the bottle library but I'm having an issue. When I run the following code: from bottle import route, run apiArray = ["key0","key1","key2"] @route('//') def hello(userApi,apiArray): for item in…
cross
  • 353
  • 1
  • 4
  • 15
-1
votes
1 answer

How to deploy a flask app to Bottle?

I have write a flask project and I want to deploy it to Bottle. I have tried to directly assign the Flask app to the app parameter, but it failed. How can I do that?
andy
  • 3,171
  • 4
  • 25
  • 39
-1
votes
1 answer

How to allow only certain users access to a webpage?

I've made a website and I am using Bottle web framework to display it (I also have other api calls hence I need bottle). My only problem is that I have a way for a user to register as admin. How can I make it so that only an admin can create…
Ramis
  • 329
  • 1
  • 4
  • 12
-1
votes
1 answer

Does bottle.py work with html associative arrays?

want to use associative arrays on Bottlypy. this is what i got on template: update.tpl controller.py def myfun(): …
vladimir prieto
  • 142
  • 1
  • 12
-1
votes
2 answers

How do I print values from mongodb in my javascript code?

I'm trying to take values from my Mongo collection and print them out on my webpage which. I'm using javascript and I'm also using the bottle framework and python to communicate database queries between the webpage and the database. Any…
Dante Hoyte
  • 243
  • 2
  • 11
-1
votes
1 answer

Receiving mail using Bottle on Google App Engine

I'm new to programming. I'm using Bottle on GAE. I want to receive and read mails (if it's possible). This is my app.yaml file: - url: /_ah/mail/contact@appid.appspotmail.com script: main.py login: admin inbound_services: - mail This is…
doru
  • 7,874
  • 2
  • 28
  • 40
-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
  • 111
  • 1
  • 9
-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
  • 27
  • 7
-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
  • 27
  • 7
-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
  • 5
-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
  • 5
-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
  • 123
  • 1
  • 13
-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??
UserAR
  • 175
  • 1
  • 2
  • 16
1 2 3
97
98