Skip to content

Instantly share code, notes, and snippets.

View bigoper's full-sized avatar

Avi Ivgi bigoper

View GitHub Profile
bigoper / txt
Created September 18, 2019 19:46
I'm an Engineer (Electronics and Computer Networks), that's how my mind works.
I disassemble everything: physically, visually... this is why my Bio is presented as a "list" :)
- I'm very blunt, I find it to be very effective and easier to understand.
- I'm All-In for sport (Running, Basketball, Soccer, Crossfit, Spartan, Table tennis, Pool), Electronics and DIY projects. (any time, any day)
- I'm a proud owner of a 2"x"4 Router CNC, 3D printer and a Laser CNC.
- It's very hard for me to say "NO".
- You won't find me talking about sport, politics or geography.
- I've lived most of my life in Israel. I speak Hebrew, English, ~Spanish and I can ~understand Arabic.
- My amazing wife is Jewish/Russian/American, so I get to practice some Russian too :)
from eve.auth import TokenAuth
from flask import Response, abort, request, current_app
class MyTokenAuth(TokenAuth):
def check_auth(self, token, allowed_roles, resource, method):
"""For the purpose of this example the implementation is as simple as
possible. A 'real' token should probably contain a hash of the
username/password combo, which should then validated against the account
data stored on the DB.
DEBUG = True
ENV = 'development'
URL_PREFIX = 'api'
from eve import Eve
from eve.auth import BasicAuth
from myApp.auth import * #this is the
from myApp.rate_limit import *
from myApp.callbacks import inject_signature, log_every_get
from myApp.middleware import Loggermiddleware
from myApp.blueprints import simple_page, page_group_by