Coder Social home page Coder Social logo

hive-db's Introduction

python-falcon-template

A sample template for Python Falcon API application. This also provides a sample on how to implement celery in Falcon.

Install

pip install -r requirements/base.txt

Folders

  • requirements
    • includes all dependencies for the project
    • base.txt
      • main requirements file
    • dev.txt
      • all your dev requirements
  • conf
    • includes the settings file
    • add local_settings.py in conf folder to override any value in settings file
  • middleware
    • includes all middleware files
  • core
    • includes all necessary files used in the app
    • resource.py
      • includes base resource class
    • routes.py
      • includes main function to register routes
      • file to add all your routes
    • test.py
      • includes base test class
  • modules
    • includes all modules in your app
    • per module folder, test folder should be included
  • app.py
    • includes create_app function
    • is where you define your middlewares and other settings
  • celery.py
    • includes celery declaration
  • runserver.sh
    • script to quickly run server
  • runtest.sh
    • script to quickly run tests

How to run server

  • make sure runserver.sh is executable
./runserver.sh

How to run tests

  • make sure runtest.sh is executable
./runtest.sh

Celery

How to run celery

  • we are using redis as our celery broker, so make sure to install redis-server
  • run redis-server and update CELERY settings found on src/conf/settings.py
  • how to run celery:
    celery -A src.celery.celery worker --loglevel=info
    
    celery -A src.celery.celery beat -l debug
    

hive-db's People

Contributors

minhnn-tiny avatar raysaavedra avatar rsaavedra-appen 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.