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 API for Connected 2

connected API for Connected 2 api for the { connected 2 } programmer : api report api follow api check username api forget password api Search api cha

2 Jun 05, 2022
“ HOLA HUMANS 👋 I'M DAISYX 2.0 ❤️ „ LATEST VERSION OF DAISYX.. Source Code of @Daisyxbot

❤️ DaisyX 2.0 ❤️ A Powerful, Smart And Simple Group Manager ... Written with AioGram , Pyrogram and Telethon... ⭐️ Thanks to everyone who starred Dais

TeamDaisyX 153 Dec 06, 2022
This Telegram bot is created to help monitor individual mood. Lean and mean

Mood bot This bot is created to help monitor your mood. Lean and mean. Deployment Install Docker and Docker Compose Populate .env file cp .env.dist .e

Piotr Markielau 1 Dec 05, 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
A discord.py bot template with easy deployment through Github Actions

discord.py bot template A discord.py bot template with easy deployment through Github Actions. You can use this template to just run a Python instance

Thomas Van Iseghem 1 Feb 09, 2022
Twitter bot that finds new friends in Twitter.

PythonTwitterBot Twitter Bot Thats Find New Friends pip install textblob pip install tweepy pip install googletrans check requirements.txt file Env

IbukiYoshida 4 Aug 11, 2021
Official Python client for the MonkeyLearn API. Build and consume machine learning models for language processing from your Python apps.

MonkeyLearn API for Python Official Python client for the MonkeyLearn API. Build and run machine learning models for language processing from your Pyt

MonkeyLearn 157 Nov 22, 2022
🐍 The official Python client library for Google's discovery based APIs.

Google API Client This is the Python client library for Google's discovery based APIs. To get started, please see the docs folder. These client librar

Google APIs 6.2k Jan 08, 2023
A Python library for PagerDuty.

Pygerduty Python Library for PagerDuty's REST API and Events API. This library was originally written to support v1 and is currently being updated to

Dropbox 164 Dec 20, 2022
A discord bot that moderates your server!

Staff Bot para Discord O que é? É um bot que modera o seu servidor no Discord, apagando mensagens indesejadas que os usuários mandem! Como usar Primei

Isac Gonçalves Cunha 3 Oct 07, 2021
NiceHash Python Library and Command Line Rest API

NiceHash Python Library and Command Line Rest API Requirements / Modules pip install requests Required data and where to get it Following data is nee

Ashlin Darius Govindasamy 2 Jan 02, 2022
A Telegram bot to extracting text from images. All languages supported.

OCR Bot A Telegram bot to extracting text from images. All languages supported. Deploy to Heroku Local Deploying Clone the repo git clone https://gith

6 Oct 21, 2022
Fast and multi-threaded script to automatically claim targeted username including 14 day bypass

Instagram Username Auto Claimer Fast and multi-threaded script to automatically claim targeted username. Click here to report bugs. Usage Download ZIP

265 Dec 28, 2022
Forward Propagation, Backward Regression and Pose Association for Hand Tracking in the Wild (CVPR 2022)

HandLer This repository contains the code and data for the following paper: Forward Propagation, Backward Regression, and Pose Association for Hand Tr

<a href=[email protected]"> 17 Oct 02, 2022
Discord group chat spammer concept.

GC Spammer [Concept] GC-Spammer for https://discord.com/ Warning: This is purely a concept. In the past the script worked, however, Discord ratelimite

Roover 3 Feb 28, 2022
❤️ Hi There Im EzilaX ❤️ A next gen powerful telegram group manager bot 😱 for manage your groups and have fun with other cool modules Made By Sadew Jayasekara 🔥

❤️ EzilaX v1 ❤️ Unmaintained. The new repo of @EzilaXBot is Public. (It is no longer based on this source code. The completely rewritten bot available

Sadew Jayasekara 18 Nov 24, 2021
Small Python Tracker clone of Electra

Discord Bot Tracker - Python Simply Track your Bots (Status) to get notified when one of those go offline/online. Paste IDs into the config.py files,

Koni 2 Nov 23, 2021
Python Capfire API wrapper

General CampfireAPI based on Campfire web. Install pip install Campfire-API Quickstart Use it without login: from campfire_api import CampfireAPI cf

Ghost 0 Jan 03, 2022
A file-based quote bot written in Python

Let's Write a Python Quote Bot! This repository will get you started with building a quote bot in Python. It's meant to be used along with the Learnin

1 Jan 19, 2022
A small module to communicate with Triller's API

A small, UNOFFICIAL module to communicate with Triller's API. I plan to add more features/methods in the future.

A3R0 1 Nov 01, 2022