Skip to content

Este projeto é uma API prática construída com FastAPI e SQLAlchemy que gerencia livros e registros de estudantes, permitindo ações como adicionar e remover livros, gerenciar detalhes de estudantes e monitorar empréstimos e devoluções de livros. Ele também inclui um dump SQL para configuração rápida do banco de dados PostgreSQL​ ( github )

Notifications You must be signed in to change notification settings

ritmodevoficial/api-sistema-de-gerenciamento-de-biblioteca

Repository files navigation

Library Management System

This is a simple API for a library management system built using FastAPI and SQLAlchemy.

Features

  • Create and manage books
  • Create and manage students
  • Handle borrowing and returning of books

Installation

  1. Clone the repository:

    git clone https://github.com/ritmodevoficial/api-sistema-de-gerenciamento-de-biblioteca.git
  2. Navigate to the directory:

    cd library-management-api
  3. (Optional) Create a virtual environment:

    python -m venv venv

    And activate it:

    • On Unix or MacOS:

      source venv/bin/activate
    • On Windows:

      .\venv\Scripts\activate
  4. Install the requirements:

    pip install -r requirements.txt
  5. Create a Postgres database for the application:

    CREATE DATABASE lmsdb;
  6. Restore the database from dumpfile

    psql -U postgres -d lmsdb < dumpfile.sql
  7. Update the database connection settings in database/__init__.py according to your PostgreSQL setup.

Usage

Run the application:

uvicorn main:app --reload

This will start the application on http://127.0.0.1:8000. You can explore the API via the built-in Swagger UI at http://127.0.0.1:8000/docs.

Endpoints

http://localhost:8000/docs#/ - Swagger UI can be investiaged for the endpoints.

About

Este projeto é uma API prática construída com FastAPI e SQLAlchemy que gerencia livros e registros de estudantes, permitindo ações como adicionar e remover livros, gerenciar detalhes de estudantes e monitorar empréstimos e devoluções de livros. Ele também inclui um dump SQL para configuração rápida do banco de dados PostgreSQL​ ( github )

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages