Skip to content

kethansarma/Poll-API

Repository files navigation

Poll-API

Basic Python REST API Documentation for performing CRUD operations through SQLite and Swagger.

Steps:

  • Install Anaconda package manager from here
  • Download the above provided environment (env.yml) and import into Anaconda by using left side "Environment" tab.
  • Once environment is created activate it with command - activate name of environment using command line.
  • Else install python directly from here.
  • For Anaconda users you need to type python in command line after activating the environment and while using command line just type python in cmd to activate python.
  • From here the steps are common - Install requirements.txt using command pip install -r requirements.txt after activating python.
  • Check that you are in the directory where requirements file is available.
  • Run createdatabase.py file to create a database with inputs from provided testdata or data as in form of data in testdata.
  • Then run server.py
  • In commandline a redirecting text (of the server) host = 127.0.0.1 with port = 5555 appears.
  • Then followed by welcome page you are redirected to a swaggerUI to Test the API.
  • In swaggerUI click on text Poll to see the API requests available.
  • Use testdata file as test inputs and enjoy testing.

About

Poll Management API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages