AnthonySanoja23 / Api_Rest_With_Hug

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Api REST with Hug 🐍 🐨

Hug is an API development framework implemented in Python 3. It is a micro-framework (minimalistic web application framework), which means that it contains as little code and integrations as possible to make it fully functional, which in turn provides greater performance, as in its own website indicates we can summarize Hug in 4 words “Obvious. Clean. Radically simple”.

The purpose of this repository is to provide an api Rest that has the function of executing requests of http verbs as they are:

  1. Get
  2. Post
  3. Put
  4. Delete

Starting 🚀

These instructions will allow you to get a working copy of the project on your local machine for development and testing purposes.

Pre- requirements 📋

You need to install in a virtual environment the following

Ubuntu 18.04 
Python3.3+
Hug (2.6.0)

Installation 🔧

We will install python 3 and Hug in a virtual environment

Installation of the virtual environment

sudo pip3 install virtualenv

Creation of virtual environment with python

virtualenv env --python=python3

Creation of virtual environment with python

virtualenv env --python=python3

Activation of the virtual environment

Once the above command is executed, a folder called env will be created and we will do the following steps:

$ cd env
$ source bin/activate

The terminal prompt indicates that the virtual environment is enabled

(env)$

Hug installation in the virtual environment

pip3 install hug --upgrade

Execute ⚙️

To run, from the command line type:

hug -f first_Api.py

About


Languages

Language:Python 100.0%