Coder Social home page Coder Social logo

kallyas / safe-courier-py Goto Github PK

View Code? Open in Web Editor NEW
2.0 0.0 2.0 161 KB

safe courier api Python version (Flask Restful)

Home Page: https://safe-courier-py.herokuapp.com/

License: MIT License

Procfile 0.05% Python 80.09% Dockerfile 1.27% HTML 18.59%
api flask flask-api flask-rest-api flask-restful

safe-courier-py's Introduction

safe-courier-py

safe courier api Python version (Flask Restful)

NodeJs Version
Laravel Version

Usage

# create virtual environment
$ virtualenv venv

# or
$ python -m venv venv

# activate virtual environment
$ source venv/bin/activate

# install dependencies
$ pip install -r requirements.txt

# run application
$ python app.py

# run tests
$ python -m unittest discover

Endpoints

Endpoint Description Method Status Response
/api/v1/auth/login Login to the application POST 200 {'acccess_token': '', 'refresh_token': ''...}
/api/v1/auth/refresh Refresh access token POST 200 {'acccess_token': '', 'refresh_token': ''...}
/api/v1/auth/logout Logout from the application POST 200 {'message': 'Logout successful'}
/api/v1/auth/logout/refresh Revoke refresh token POST 200 {'message': 'Successfully logged out'}
/api/v1/auth/register Register a new user POST 201 {'message': 'Registration successful'}
/api/v1/parcels/create create a parcel POST 201 {'message': 'Parcel created successfully'}
/api/v1/parcels/<int: percel_id> Get Parcel by ID GET 200 {...}
/api/v1/parcels/ Get Parcels (curent user) GET 200 [{...}, {...}, {...}]
/api/v1/parcels/<int: percel_id> Update Parcel PUT 200 {'message': 'Parcel updated successfully'}
/api/v1/parcels/<int: percel_id> Delete Parcel DELETE 200 {'message': 'Parcel deleted successfully'}
/api/v1/users/int:user_id/parcels Get parcels by user id GET 200 [{...}, {...}, {...}]
/api/v1/users/int:user_id/parcels/<int: percel_id> Get parcel by user id and parcel id GET 200 {...}
/api/v1/admin/parcels/int:parcel_id Update parcel status, current location (admin only) PUT 200 {...}
/api/v1/admin/parcels Get all parcels (admin only) GET 200 [{...}, {...}, {...}]

API Documentation

API Documentation

Author

Kallyas

License

MIT

Contributing

To contribute to this project, please fork the repository and make a pull request.

safe-courier-py's People

Contributors

dependabot[bot] avatar kallyas avatar

Stargazers

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