Git Product home page Git Product logo

flask-vrfs-api's Introduction

Small Example Flask API with VRFs

This is a small example API that allows you to GET, POST, and DELETE VRFs on a linux host. This is meant to be an example of how I like to develop python api's using flask in conjunction with the flask-apispec library.

Vagrant Environment

Within this repo I've included a vagrant file if you'd like to run it locally. You should have vagrant and virtualbox installed prior to bringing up the vagrant environment.

Vagrant Up

git clone https://github.com/briantsaunders/flask-vrfs-api.git
cd flask-vrfs-api
vagrant up

Ansible is used to provision the vagrant box. It installs pip3 and the app development requirements. The vagrant file will port forward port 5000 to the vagrant box so when you run the app within the vagrant box you can send requests from your local machine.

Testing in Vagrant

Once the vagrant environment is up issue the following commands to run the app.

vagrant ssh
cd /vagrant
sudo python3 manage.py

From your local machine you should now be able to hit the swagger docs at http://localhost:5000/api/docs. If you use postman on your local machine you can hit the API from that as well at http://localhost:5000/api/vrfs.

flask-vrfs-api's People

Contributors

briantsaunders avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.