Questions tagged [falcon]

Falcon is an open source, multi-paradigm programming language.

Falcon is an open source, multi-paradigm programming language. Falcon was created by Giancarlo Niccolai. Falcon has been actively developed since 2003.

Useful links

67 questions
14
votes
7 answers

Python Falcon - get POST data

I try to use falcon package in my project. Problem is I didn't find a way to get body data from the HTTP post request. I used code from example, but req.stream.read() doesn't return JSON as expected. The code is: raw_json =…
Gomi
  • 602
  • 1
  • 6
  • 20
8
votes
1 answer

How to use Gevents with Falcon?

I am trying to use Falcon web framework with async workers like gevents and asyncio. I have been looking around for tutorials, but I haven't been able to find any which combine implementation of gevent with falcon. Since I have never used gevents…
AnisH_GuptA
  • 137
  • 1
  • 10
6
votes
2 answers

How can we get path params in falcon middleware, if any path param in the route?

My routes are as follows: app.add_route('/v1/my_route', MyResource()) app.add_route('/v1/my_route/{app_id}', MyResource()) app.add_route('/v1/my_route2/any_route', AnyRouteResource()) app.add_route('/v1/my_route2/any_route/{app_id}',…
Nilesh Soni
  • 395
  • 2
  • 10
6
votes
4 answers

Falcon CORS middleware does not work properly

I'm using Falcon CORS to allow access to my web service only from several domains. But it does not work properly. Let me explain, if we take a look at my implementation: ALLOWED_ORIGINS = ['*'] crossdomain_origin =…
Denys Lytvinyuk
  • 323
  • 3
  • 13
6
votes
4 answers

Custom response during falcon middleware exception

I'm writing Falcon middleware for my application. When i get any errors i want to raise error, break process and return my custom response, that looks like: { "status": 503, "message": "No Token found. Token is required." } But standard…
Denys Lytvinyuk
  • 323
  • 3
  • 13
5
votes
0 answers

Falcon - how to validate incoming requests against Swagger specification?

What is the most convenient and comprehensive way of validating incoming requests in Falcon views against Swagger 2.0 specification written in json? I used to do the same for Pyramid apps with great tool called pyramid_swagger. It was seamlessly…
gwaramadze
  • 3,603
  • 3
  • 26
  • 39
5
votes
1 answer

Falcon through Waitress on Windows OS

i've started making an API using Falcon on Ubuntu and I've been using gunicorn to test it but I also want to try developing it on Windows too. As we know gunicorn doesn't work on Windows yet so I will have to use another server that can run wsgi.…
Nick
  • 415
  • 7
  • 25
4
votes
3 answers

CORS failure in with Python Falcon even with heads for Auth Pre-Flight

Receiving these error when using the OPTIONS verb in Angular2 http.get(url, options), even though the appropriate CORS headers are set in Falcon Rest API. XMLHttpRequest cannot load http://localhost:8000/names. Request header field Authorization…
user2040800
  • 217
  • 3
  • 14
4
votes
1 answer

Falcon framework - how to store variables in a session?

I need to store the current user id in the session in my Falcon application. In Flask I would do: from flask import Flask, session app = Flask(__name__) @app.route('/') def example(): session['foo'] = 'bar' return…
Nee
  • 556
  • 2
  • 16
4
votes
1 answer

data passing app in falcon python

Before asking the question i want to mention that i am aware of the fact that i can use django instead to make the app, but i need to use falcon and nothing else. i am just looking for an approach lets take a very simple scenario so that i can…
kshitij singh
  • 303
  • 2
  • 9
  • 17
3
votes
4 answers

What is your opinion on the Falcon language?

Falcon is a programming language that supports multiple paradigms like message passing, OO, functional, and yet the code looks nice and clean. What do you think, does it have a chance to take off and be used as a general purpose programming glue…
Marko
  • 28,383
  • 17
  • 70
  • 107
2
votes
1 answer

Why does my Falcon script print the date a month ahead instead of today's date?

Today is April 25, 2009 which in US format is abbreviated month-day-year, so today is 04-25-09. This line > CurrentTime().toString("%m-%d-%y") should print "04-25-09". Instead it prints "05-25-09". Why is that? According to the docs CurrentTime()…
ssakl
  • 710
  • 2
  • 10
  • 23
2
votes
1 answer

Is it possible to run Falcon app from Python?

I'm moving my code from Flask to Falcon and a small annoyance is that I can't seem to find way to run my Falcon-based app from the __main__ method. In my Flask app I had this: if __name__ == '__main__': app.run(port=os.getenv('PORT', 5000)) Is…
Bostone
  • 34,822
  • 38
  • 158
  • 216
2
votes
2 answers

Docker run cannot find executable "uwsgi"

I am trying to deploy a falcon app with Docker. Here is my Dockerfile: FROM python:2-onbuild # Set the working directory to /app WORKDIR /app # Copy the current directory contents into the container at /app ADD . /app RUN pip install -r…
Kid_Learning_C
  • 1,001
  • 1
  • 13
  • 25
2
votes
3 answers

How to convert neomodel object into json? (is not JSON serializable)

I use Falcon framework and neomodel in order to communicate with neo4j database. I have some nodes in DB and I try to return information about them via API (get methon) as a JSON object. In order to retrive information I use the code people =…
trojek
  • 2,350
  • 1
  • 21
  • 49
1
2 3 4 5