Coder Social home page Coder Social logo

booktracker-api's Introduction

Book Tracker API using Django and MySQL

  • (TechOps Session - October 24, 2023)

Welcome to the Book Tracker API, the backend component of a web application developed with Django and MySQL. This API serves as the foundation for managing and tracking books read and their respective authors.

Table of Contents

Prerequisites

Before you dive into the project, make sure you have the following prerequisites in place:

  • Python 3
  • Django
  • MySQL (or an alternative database of your choice)

Getting Started

Installation

  1. Clone this repository to your local machine:

    git clone https://github.com/sosmongare/booktracker-api.git
  2. Navigate to the project directory:

    cd booktracker-api
  3. Install the necessary Python packages using Pipenv:

    pip install -r requirements.txt

Running the Server

  1. Activate the virtual environment (On windows):

    . env/scripts/activate
  2. Launch the Django development server:

    python manage.py runserver

The server will start and be accessible at http://localhost:8000/.

Project Structure

The project is structured as follows:

  • backend/: The primary Django project directory.
  • booktracker/: A Django app that houses models, views, and serializers.
  • api/: Contains API views and endpoints.
  • models.py: Defines the database models, such as Book and Author.
  • serializers.py: Serializes model data for API responses to a JSON representation.
  • views.py: Contains API views and viewsets.

API Endpoints

  • GET /api/books/: Retrieve a list of all books.
  • POST /api/books/: Create a new book.
  • GET /api/books/<id>/: Retrieve a specific book.
  • PUT /api/books/<id>/: Update a specific book.
  • DELETE /api/books/<id>/: Delete a specific book.
  • GET /api/authors/: Retrieve a list of all authors.
  • POST /api/authors/: Create a new author.
  • GET /api/authors/<id>/: Retrieve a specific author.
  • PUT /api/authors/<id>/: Update a specific author.
  • DELETE /api/authors/<id>/: Delete a specific author.

Contributing

We welcome contributions to this project! If you'd like to contribute, please follow these steps:

  1. Fork the project.
  2. Create a feature branch: git checkout -b feature/my-feature.
  3. Commit your changes: git commit -m 'Add some feature'.
  4. Push to the branch: git push origin feature/my-feature.
  5. Submit a pull request.

Happy coding!

booktracker-api's People

Contributors

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