GithubHelp home page GithubHelp logo

pceuropa / uwsgi-ini Goto Github PK

View Code? Open in Web Editor NEW
5.0 3.0 0.0 11 KB

uWsgi config ini file for Falcon framework. Also example Falcon app are included to check configuration rapidly.

License: Apache License 2.0

Python 100.00%
uwsgi falcon pytest

uwsgi-ini's Introduction

Falcon and uWSGI

Falcon is faster than flask, uWSGi uWSGI is faster than Gunicorn. Test based on pceuropa/testing-rest-api

DIRECTORY STRUCTURE

  requirements.txt      pythons requirements packages 
  main.py               falcon app
  uwsgi.ini             contains config file needed to run app by uwsgi
  tests.py              tests based on pytest

REQUIREMENTS

  • Python 3+
  • pytest # to tests

INSTALATION

virtualenv -p python3 venv && source venv/bin/activate
pip3 install -r requirements.txt

CONFIGURATION

Configuration is in uwsgi.ini. Only Set proper patch and ready to run.

RUN

  1. Without uwsgi
python3 main.py
  1. With uwsgi but by command. Please run this command on path of application
uwsgi --http :8000 --wsgi-file main.py --callable app -H $(pwd)/venv/
  1. With uwsgi with help ini file. Good way to setup systemd
uwsgi uwsgi.ini

Tests

mytest test.py -v

Bonus

Nginx configuration

location / {
    proxy_pass       http://localhost:8000;
    proxy_set_header Host      $host;
    proxy_set_header X-Real-IP $remote_addr;
}

Stackoverflow topic

uwsgi-ini's People

Contributors

pceuropa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  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.