Giter VIP home page Giter VIP logo

small-rest-project's Introduction

Run tests

Small-rest-project💻


This is rest project which uses Django Rest Framework with a connected Database.

In output it returns details of person or persons with given id.

The operation of the program isn't difficult, but it has extensive error handling.

Below is a link to the database I used.

Db: https://raw.githubusercontent.com/pplonski/datasets-for-start/master/adult/data.csv

Setup

To use it you have to go to the Small-rest-project directory in the console:

cd Small-rest-projekt

Then go to the backend/server directory:

cd backend/server

Now all that's left, is to run the program in console.

python manage.py runserver

Endpoints

In respone you will have http link. Add get-data at the end of link to enter the base stage of app.

It returns first 3 people in database.

127.0.0.1:8000/get-data

To return details of single person add get-data/'number' at the end of link.

127.0.0.1:8000/get-data/1

You can return many persons. To do it, you need to add second number after /.

127.0.0.1:8000/get-data/1/5

It outputs details of 5 people from id 1 to 5 in this case.

App appearance

Below you can see how it looks:

Check media folder for more images.

And that's it 🎉

small-rest-project's People

Contributors

maciekmalachowski avatar

Stargazers

Piotr 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.