Git Product home page Git Product logo

flask-api-template's People

Contributors

widal001 avatar

Watchers

 avatar  avatar

flask-api-template's Issues

Upgrade project structure

Summary

Upgrade project architecture to make the code base easier to extend and reproduce.

To Do

  • Upgrade to python 3.9
  • Dockerize the application
  • Reorganize the file structure

Endpoints

Summary

Create endpoints and tests for the demo API

Expected Behavior

The following endpoints will be created:

  • Books
    • GET api/books/
    • POST api/books/
    • GET api/books/{book_id}/
    • PUT api/books/{book_id}/
  • Libraries
    • GET api/libraries/
    • GET api/libraries/{library_id}/books
    • POST api/libraries/{library_id}/books
    • POST api/libraries/{library_id}/books/{book_id}/borrow
    • POST api/libraries/{library_id}/books/{book_id}/return

Swagger Documentation

Summary

Creates swagger documentation for the sample API endpoints

To Do

  • Endpoints
    • GET /books
    • POST /books
    • GET /books/<book_id>
    • PUT /books/<book_id>
    • GET /libraries
    • POST /libraries
    • GET /libraries/<lib_id>/books
    • PUT /libraries/<lib_id>/books/<book_id>
    • POST /libraries/<lib_id>/books/<book_id>/borrow
    • POST /libraries/<lib_id>/books/<book_id>/return
  • Models
    • Book
    • Library
    • LibraryBook

Auto-formatting and docstrings

Summary

Sets up auto-formatting using black, flake8, and pre-commit hooks and add docstrings to the existing code.

To Do

  • Auto-formatting
    • Setup pre-commit-config.yaml
    • Setup .toml for black
    • Setup .flake8 for flake8
  • Docstrings
    • app.py
    • run.py
    • models
      • library_model.py
      • book_model.py
      • library_book_model.py
    • schemas
      • book_schema.py
      • library_schema.py
    • resources
      • book_resource.py
      • library_resource.py
    • tests
      • conftest.py
      • test_book.py
      • test_library.py
      • test_populate_db.py

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.