A small library app backend. Half Baked.
- Clone Me
- Create a virtual environment if required.
- Install dependencies from requirements.txt
- Set environment variable
DATABASE_URLto database connector URI. - Make migrations, migrate and run
-
List all books
/book/ -
Search by author in book list
/book/?author=author_name -
Search by title in book list
/book/?title=title_name -
Search by book tag
/book/?booktag__tag=tag -
Search by book_id
/book/?book_id=book_id -
Search by category
/book/?category=categoryWhere category can be
magazine,book,comics. -
Or use a combination of any of 2, 3, 4, 5, 6
-
See details of a book with pk
pk/book/pk -
Create a new Book
/book/new -
Add tag to a book with pk
pk/book/pk/tag/?tags=tag1,tag2, tag 3
-
List all Library Users
/lib_user/ -
Search for user in list using pk
/lib_user/?pk=pk -
Search for user in list using name
/lib_user/?name=name -
Search for user in list using uid
/lib_user/?uid=uid -
Combine any of 2,3 and 4
-
Search for any using
/lib_user/?search=termterm can be
author,title,booktag,book_id,category -
Specify ordering by
/lib_user/?ordering=field_one, field_twofield can be any of
author,title,book_id,category -
Create a new user
/lib_user/new -
Get users with upcoming birthdays
/lib_user/birthdays/ -
List books lent by a user, using users pk
/lib_user/pk/lent/pending/ -
See recent birthdays
/lib_user/birthdays/ -
Activate an user
/lib_user/pk/activate/ -
Deactivate an user
/lib_user/pk/deactivate
-
List all lents
/lib_user/lent/ -
List all lents - search for user with pk
pk/lib_user/lent/?lib_user=pk -
List all lents - search for book with pk
pk/lib_user/lent/?book=pk -
List all lents - search for user with name containing
name/lib_user/lent/?lib_user__name=name -
List all lents - search for book with name containing
name/lib_user/lent/?book_title=name -
List all lents - can mix any of the above queries
-
Create new Lent
/lib_user/lent/new/ -
Upcoming or Missed Dues
/lib_user/lent/recent_dues/
Users can add note
-
List all notes
/note/ -
Create new note
/note/new/ -
Delete note
/note/pk/delete
A Sample of API can be found here.