DEV Community

Momin Iqbal
Momin Iqbal

Posted on

Python web Developers

WebRaft

webraft to save development time and effort

GitHub logo MominIqbal-1234 / webraft

webraft for python web developers

Downloads webraft

Downloads

WebRaft

creating and reading JSON Web Tokens, extracting user agent information, retrieving IP data, and creating and reading API keys

install webraft

link: https://pypi.org/project/webraft/

pip install webraft --upgrade
Enter fullscreen mode Exit fullscreen mode

Support

WebRaft Support Four Python web-framework

1) Django # django 2) Flask # flask 3) FastAPI # fastapi 4) Bottle # bottle 

Django Rest-API

Create Secret Key

from webraft.core import GenerateKey print(GenerateKey.generate_key())
Enter fullscreen mode Exit fullscreen mode

Support Algorithm

HS256 HS512 HS384 

request

request is an object that represents an incoming HTTP request <br> webraft take every function request object <br> this doc show use to request in different python web framework

# Django def home(request) pass # FastAPI from fastapi import FastAPI, Request app = FastAPI() @app.get("/") async def read_user(request: Request): pass # Flask from flask import Flask, request
Enter fullscreen mode Exit fullscreen mode

Top comments (0)