Skip to content

khanhicetea/hug-n-rest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

👐 & 😌

Hug

Introduction

Hug-n-Rest is a micro framework for RESTful API based on Hug.

Usage ( python3 required )

$ virtualenv -p python3 venv
$ source venv/bin/active
$ pip install -r requirements.txt
$ python manage.py db upgrade head
$ gunicorn --reload app:__hug_wsgi__

Demo : using HTTPie

http POST :8000/api/v1/groups name=Group1 alias=g1 max_members=123
http POST :8000/api/v1/groups name=Group2 alias=g2
http :8000/api/v1/groups

http POST :8000/api/v1/users name="Khanh Ice Tea" fullname="Khanh Nguyen" email="[email protected]" password="123456" group_id=2
http POST :8000/api/v1/users name="Chuck Norris" fullname="Chuck norris" email="[email protected]" password="nobody" group_id=1
http :8000/api/v1/users

About

Hug and Rest - A Python RESTful micro-framework

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published