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

77 questions
16
votes
8 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
  • 632
  • 1
  • 7
  • 23
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
7
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
  • 405
  • 5
  • 12
7
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
  • 353
  • 4
  • 13
7
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
  • 545
  • 12
  • 31
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
  • 353
  • 4
  • 13
5
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
  • 227
  • 4
  • 14
5
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
  • 363
  • 2
  • 10
  • 19
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
  • 30,263
  • 18
  • 74
  • 108
3
votes
1 answer

Set Nginx Timeout & Default JSON Response

I have a simple Falcon REST API for a POST request that accepts the JSON formatted body: { "Input": "input string request" } and returns: { "Output: "output string response" } It may be helpful to note that in production, all the requests will be…
spatel4140
  • 383
  • 3
  • 10
3
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
  • 2,605
  • 4
  • 39
  • 71
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
  • 700
  • 2
  • 10
  • 23
2
votes
1 answer

Finetuning Open LLMs

I am a newbie trying to learn fine tuning. Started with falcon 7B instruct LLM as my base LLM and want to fine tune this with open assistant instruct dataset. I have 2080 Ti with 11G VRAM. So I am using 4 bit quantization and Lora. These are the…
codemugal
  • 81
  • 1
  • 1
  • 4
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
  • 36,858
  • 39
  • 167
  • 227
2
votes
2 answers

how to visit the my falcon app after docker build and docker run?

As a follow up question of Docker run cannot find executable "uwsgi" : I have successfully executed docker build and docker run with the Dockerfile as: FROM python:2-onbuild # Set the working directory to /app WORKDIR /app # Copy the current…
Kid_Learning_C
  • 2,605
  • 4
  • 39
  • 71
1
2 3 4 5 6