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
For Help/Questions Join in discord

Simple-Nitro-Generator-Source Must have installed python! Discord: $MartoBossX#7777 Server: https://discord.gg/ErynDxTV5Y DONATE: (Crypto) BTC: bc1qg8

1 Jan 08, 2022
Python binding for Terraform.

Python libterraform Python binding for Terraform. Installation $ pip install libterraform NOTE Please install version 0.3.1 or above, which solves the

Prodesire 28 Dec 29, 2022
Discord ToolBox is a discord bot developed by DJD320 created for the purpose of having some convenient tools in the form of a single bot.

Discord ToolBox Discord ToolBox is a discord bot developed by DJD320 created for the purpose of having some convenient tools in the form of a single b

3 Aug 07, 2021
An API wrapper for Henrik's Unofficial VALORANT API

ValorantAPI.py An API wrapper for Henrik's Unofficial VALORANT API Warning!! This project is still in beta and only contains barely anything yet. If y

Jakkaphat Chalermphanaphan 0 Feb 04, 2022
StudyLion is a Discord bot that tracks members' study and work time while offering members to view their statistics and use productivity tools such as: To-do lists, Pomodoro timers, reminders, and much more.

StudyLion - Discord Productivity Bot StudyLion is a Discord bot that tracks members' study and work time while offering members the ability to view th

45 Dec 26, 2022
Filters to block and remove copycat-websites from DuckDuckGo and Google

uBlock Origin - Shitty Copy-Paste websites filter Filter for uBlock origin to remove spam-website results from DuckDuckGo and Google that just blatant

99 Dec 15, 2022
Discord Token Nuker With Python

Discord token nuker a.k.a A$$Fvcker Setup For installing the requirements do this: pip install -r requirements.txt To start the Token nuker run this

PR3C14D0 8 Sep 22, 2022
Crystal Orb is a discord bot made from discord.py and python

Crystal orb Replacing barbot Overview Crystal Orb is a discord bot made from discord.py and python, Crystal Orb is for anti alt detection and other st

AlexyDaCoder 3 Nov 28, 2021
A quick way to verify your Climate Hack.AI (2022) submission locally!

Climate Hack.AI (2022) Submission Validator This repository contains code that allows you to quickly validate your Climate Hack.AI (2022) submission l

Jeremy 3 Mar 03, 2022
Orca is an extensive and extendable Python 3.x library for the Discord API.

Orca is an extensive and extendable Python 3.x library for the Discord API.

RPS 4 Apr 03, 2022
A minimalistic, modern Discord bot for roles and polls using dropdowns

DropBot A minimalistic, modern Discord bot for roles and polls using dropdowns Made by ThatOneCalculator Technologies used Instructions Type /, and na

ModernBots 1 Jun 27, 2022
Simple stock price analytics

mune · Mune is an open source python web application built to analyze stocks, named after Homma Munehisa. Currently, the forecasting component is powe

Richard Hong 14 Aug 30, 2021
Bitbucket Server API Wrapper

A simple wrapper for the Atlassian's Bitbucket Server / Bitbucket Datacenter (formerly Stash) REST API, written in Python.

Schweitzer Engineering Laboratories 4 Jan 06, 2023
Python Library to Extract youtube video Tags without Youtube API

YoutubeTags Python Library to Extract youtube video Tags without Youtube API Installation pip install YoutubeTags Example import YoutubeTags from Yout

Nuhman Pk 17 Nov 12, 2022
This bot will delete messages containing blacklisted words in your telegram groups.

Profanity Detector Bot This bot will delete messages containing blacklisted words in your telegram groups. Made using ProfanityDetector.

Aditya 17 Oct 08, 2022
ZELDA USERBOT adalah userbot Telegram modular yang berjalan di Python3 dengan database sqlalchemy.

ZELDA USERBOT TELEGRAM Userbot Yang Di Buat Karena Sering Gabut Di Telegram. ZELDA USERBOT adalah userbot Telegram modular yang berjalan di Python3 de

1 Dec 23, 2021
A management system designed for the employees of MIRAS (Art Gallery). It is used to sell/cancel tickets, book/cancel events and keeps track of all upcoming events.

Art-Galleria-Management-System Its a management system designed for the employees of MIRAS (Art Gallery). Backend : Python Frontend : Django Database

Areesha Tahir 8 Nov 30, 2022
VideocompBot - This is TG Video Compress BoT. Prouduct By BINARY Tech 💫

VideocompBot - This is TG Video Compress BoT. Prouduct By BINARY Tech 💫

1 Jan 04, 2022
A Python library for miHoYo bbs and HoYoLAB Community

A Python library for miHoYo bbs and HoYoLAB Community. genshin 原神签到小助手

384 Jan 05, 2023
Amanda-A next gen powerful telegram group manager bot for manage your groups and have fun with other cool modules.

Amanda-A next gen powerful telegram group manager bot for manage your groups and have fun with other cool modules.

Team Amanda 4 Oct 21, 2022