Flask-SQLAlchemy API for daisuki-web

Overview

💟 Anime Daisuki! API

API de animes com cadastro de usuários. O usuário autenticado pode avaliar e favoritar animes, comentar episódios e verificar o histórico de episódios assistidos

Projeto concluído ✔️

SobreTecnologiasInstalaçãoDemonstraçãoAutoresLicença

Sobre

Projeto desenvolvido no terceiro trimestre da Kenzie Academy Brasil com o objetivo de criar uma API, aplicando os conceitos de CRUD, SQL, migrations, autenticação (JSON Web Tokens) e segurança (geração de hash para senha). Anime Daisuki! API é uma aplicação de cadastro de usuários, animes, episódios e comentários. Você pode utilizar o deploy no Heroku e fazer requisições de qualquer client seguindo os endpoints /users, /animes e /episodes na documentação. Caso queira rodar a aplicação na sua própria máquina, siga as instruções na seção Instalação.

Tecnologias

As seguintes ferramentas foram utilizadas na construção do projeto:

Instalação

Renomeie o arquivo .env.example para .env e preencha com as informações do banco que deseja utilizar. Ative o ambiente virtual seguindo os comandos:

python -m venv venv
source venv/bin/activate

Agora, dentro do ambiente virtual, insira o comando para instalar as dependências:

pip install -r requirements.txt

Para que as tabelas sejam inseridas no seu banco de dados, rode o comando:

flask db upgrade

Insira dados nas tabelas com os seguintes comandos (nessa ordem):

flask cli_genres create
flask cli_animes create
flask cli_episodes create

Inicie o flask:

flask run

Pronto! Agora você já pode fazer requisições seguindo os endpoints na seção Demonstração, substituindo a url do heroku pelo localhost. Mas caso queira cadastrar um usuário com permissão de admin, insira o seguinte comando substituindo por seu e-mail, usuário e senha:

flask cli_admin create [email protected] teste 1234

É possível também promover um usuário já cadastrado com o comando:

flask cli_admin upgrade [email protected]

ou

flask cli_admin upgrade --username=teste

E para remover o cargo de admin, tornando-o um usuário comum, rode o comando:

flask cli_admin downgrade [email protected]

ou utilize o parâmetro --permission para torná-lo um moderador

flask cli_admin downgrade [email protected] --permission=mod

Demonstração

Todos os endpoints da aplicação estão descritos na documentação. A rota de criação de users no Heroku permite somente a criação de usuários comuns, então para criar um admin ou mod siga os últimos comandos da seção acima e faça as requisições utilizando um client como o Postman e substituindo a url com o localhost:

Postman

Autores

Feito com ❤️ por:

Licença

Este projeto está sob a licença MIT.

Owner
Paulo Thor
Full Stack Developer
Paulo Thor
A Python interface between Earth Engine and xarray for processing weather and climate data

wxee What is wxee? wxee was built to make processing gridded, mesoscale time series weather and climate data quick and easy by integrating the data ca

Aaron Zuspan 160 Dec 31, 2022
Handles SDVX EXCEED GEAR result screen photos and attempts to read it.

Handles SDVX EXCEED GEAR result screen photos and attempts to read it.

silverhawke 1 Jan 08, 2022
An advanced api client for python botters.

[ALPHA] pybotters An advanced api client for python botters. 📌 Description pybottersは仮想通貨botter向けのPythonライブラリです。複数取引所に対応した非同期APIクライアントであり、bot開発により素晴ら

261 Dec 31, 2022
A Sublime Text plugin that displays inline images for single-line comments formatted like `// ![](example.png)`.

Inline Images Sometimes ASCII art is not enough. Sometimes an image says more than a thousand words. This Sublime Text plugin can display images inlin

Andreas Haferburg 8 Jul 01, 2022
Python SDK for 42DI

42di Python SDK Install pip install git+https://github.com/42di/python-sdk import import di #42di import pandas_datareader as pdr Init SDK project =

42DI 2 Nov 03, 2021
Automatically commits and pushes changes from a specified directory to remote repository

autopush a simple python program that checks a directory for updates and automatically commits any updated files (and optionally pushes them) installa

carreb 1 Jan 16, 2022
Vhook: A Discord webhook spammer / deleter open source coded by vesper

Vhook_Spammer Vhook is a advanced Discord webhook spammer / deleter with embeds,

Vesper 17 Nov 13, 2022
Find Roblox Groups & Send To Discord

Roblox-Group-Finder A tool to help you find ownerless roblox groups :) It's really easy, all you need is a discord webhook :) It will not send locked

1 Dec 13, 2021
Auto Join: A GitHub action script to automatically invite everyone to the organization who comment at the issue page.

Auto Invite To Org By Issue Comment A GitHub action script to automatically invite everyone to the organization who comment at the issue page. What is

Max Base 6 Jun 08, 2022
Spotify playlist anonymizer.

Spotify heavily personalizes auto-generated playlists like Song Radio based on the music you've listened to in the past. But sometimes you want to listen to Song Radio precisely to hear some fresh so

Jakob de Maeyer 9 Nov 27, 2022
Paginator for Dis-Snek Python Discord API wrapper

snek-paginator Paginator for Dis-Snek Python Discord API wrapper Installation: pip install -U snek-paginator Basic Example: from dis_snek.client impo

1 Nov 04, 2021
Box SDK for Python

Box Python SDK Installing Getting Started Authorization Server-to-Server Auth with JWT Traditional 3-legged OAuth2 Other Auth Options Usage Documentat

Box 371 Dec 29, 2022
Twitter-Scrapping - Tweeter tweets extracting using python

Twitter-Scrapping Twitter tweets extracting using python This project is to extr

Suryadeepsinh Gohil 2 Feb 04, 2022
Me and @nathanmargni did a small analysis on what are the best strategies to win more games of League of Legends.

Me and @nathanmargni did a small analysis on what are the best strategies to win more games of League of Legends.

Christian Berchtold 2 Jan 19, 2022
The most Advanced yet simple Multi Cloud tool to transfer Your Data from any cloud to any cloud remotely based on Rclone.⚡

Multi Cloud Transfer (Advanced!) 🔥 1.Setup and Start using Rclone on Google Colab and Create/Edit/View and delete your Rclone config file and keep th

Dr.Caduceus 162 Jan 08, 2023
WakeNote is a tool that hides notifications from you until you confirm you want to read them, with technology to help prevent the reading of depressing messages first thing in the morning.

By: Seanpm2001, Et; Al. Top README.md Read this article in a different language Sorted by: A-Z Sorting options unavailable ( af Afrikaans Afrikaans |

Sean P. Myrick V19.1.7.2 3 Oct 21, 2022
Qbittorrent / Aria2 Mirror & Leech Telegram Bot

This is a Telegram Bot written in Python for mirroring files on the Internet to your Google Drive or Telegram. Based on python-aria-mirror-bot Feature

Hüzünlü Artemis [HuzunluArtemis] 81 Jul 15, 2022
Easy Google Translate: Unofficial Google Translate API

easygoogletranslate Unofficial Google Translate API. This library does not need an api key or something else to use, it's free and simple. You can eit

Ahmet Eren Odacı 9 Nov 06, 2022
Projeto Informações Conta do Instagram - Instagram Account Information Project

VESTA-tools A collection of simple tools that proved to be needed for handling large periodic calculations with the VASP software package. distTotCalc

Thiago Souza 1 Dec 02, 2021
Project template for using aws-cdk, Chalice and React in concert, including RDS Postgresql and AWS Cognito

What is This? This repository is an opinonated project template for using aws-cdk, Chalice and React in concert. Where aws-cdk and Chalice are in Pyth

Rasmus Jones 4 Nov 07, 2022