mirror of
https://github.com/kennethreitz/replit-py.git
synced 2026-06-05 23:10:18 +00:00
21 lines
349 B
Python
21 lines
349 B
Python
from replit import maqpy
|
|
|
|
app = maqpy.App(__name__)
|
|
|
|
|
|
@app.route("/")
|
|
@maqpy.needs_sign_in(login_res=f"Hello! {maqpy.sign_in_snippet}")
|
|
def index():
|
|
return "Index function"
|
|
|
|
|
|
# needs_signin can also be called with no args
|
|
@app.route("/test")
|
|
@maqpy.needs_sign_in
|
|
def test():
|
|
return "Test function"
|
|
|
|
|
|
if __name__ == "__main__":
|
|
app.run()
|