{"id":27883081,"url":"https://github.com/mrnicolass/library-with-flask","last_synced_at":"2026-05-04T10:36:11.171Z","repository":{"id":257322873,"uuid":"857164079","full_name":"MrNicolass/Library-with-Flask","owner":"MrNicolass","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-13T00:09:07.000Z","size":248,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-05T06:12:33.467Z","etag":null,"topics":["babel","flask","ouath","python","sqlite"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MrNicolass.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-09-14T00:10:40.000Z","updated_at":"2025-04-04T14:43:59.000Z","dependencies_parsed_at":"2024-11-22T23:19:52.682Z","dependency_job_id":"8244450d-2bfa-4972-93f0-e13aa4b5e749","html_url":"https://github.com/MrNicolass/Library-with-Flask","commit_stats":null,"previous_names":["mrnicolass/n1---library-with-flask","mrnicolass/library-with-flask"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MrNicolass/Library-with-Flask","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrNicolass%2FLibrary-with-Flask","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrNicolass%2FLibrary-with-Flask/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrNicolass%2FLibrary-with-Flask/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrNicolass%2FLibrary-with-Flask/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MrNicolass","download_url":"https://codeload.github.com/MrNicolass/Library-with-Flask/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrNicolass%2FLibrary-with-Flask/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259470941,"owners_count":22862997,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["babel","flask","ouath","python","sqlite"],"created_at":"2025-05-05T06:11:52.147Z","updated_at":"2026-05-04T10:36:11.142Z","avatar_url":"https://github.com/MrNicolass.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1\u003eN1 - Web Library with Flask\u003c/h1\u003e\n\u003cdiv\u003e\n\u003cimg alt=\"Static Badge\" src=\"https://img.shields.io/badge/Status-Done-Green\"\u003e\n\u003cimg alt=\"Static Badge\" src=\"https://img.shields.io/badge/Step-N1-Green\"\u003e\u003cimg alt=\"Static Badge\" src=\"https://img.shields.io/badge/N2-Green\"\u003e\u003cimg alt=\"Static Badge\" src=\"https://img.shields.io/badge/N3-Green\"\u003e\n\u003c/div\u003e\n\u003ch2\u003eSummary\u003c/h2\u003e\n\u003cp\u003eIt's a simple website developed with pure Python (API), HTML and CSS (design) in order to learn how API's works; Was proposed as test (N1 = first grade), consisting in one of three notes we've the semester of software engineering degree of Católica University in Jaraguá do Sul, Brazil.\u003c/p\u003e\n\n\u003ch2\u003eWhat's the scope and its limitations?\u003c/h2\u003e\n\u003cp\u003eFor grade N1, we will create user management and a login screen (without using JWT tokens).\u003c/p\u003e\n\n\u003cp\u003eYou will need to implement:\u003cbr\u003e\n\u003cstrong\u003e(There's a file named \u003ccode\u003erequirements.py\u003c/code\u003e that contains all extensions installed!)\u003c/strong\u003e\n\u003c/p\u003e\n\n\u003col\u003e\n  \u003cli\u003eDatabase Table(initdb should create the user table):\n    \u003col\u003e\n      \u003cli\u003eThe user table should have the following fields: \n        \u003cul\u003e\n          \u003cli\u003e\u003ccode\u003eid;\u003c/code\u003e\u003c/li\u003e\n          \u003cli\u003e\u003ccode\u003elogin\u003c/code\u003e (must be the email);\u003c/li\u003e\n          \u003cli\u003e\u003ccode\u003epassword\u003c/code\u003e;\u003c/li\u003e\n          \u003cli\u003e\u003ccode\u003ereal name\u003c/code\u003e;\u003c/li\u003e\n          \u003cli\u003e\u003ccode\u003euser creation date\u003c/code\u003e;\u003c/li\u003e\n          \u003cli\u003e\u003ccode\u003estatus\u003c/code\u003e (active/blocked);\u003c/li\u003e\n          \u003cli\u003e\u003ccode\u003elast update date\u003c/code\u003e of the user.\u003c/li\u003e\n        \u003c/ul\u003e\n      \u003c/li\u003e\n    \u003c/ol\u003e\n  \u003c/li\u003e\n\n  \u003cli\u003eCreate endpoints to perform \u003cstrong\u003eCRUD\u003c/strong\u003e operations on the table:\n    \u003col style=\"list-style-type: upper-alpha;\"\u003e\n      \u003cli\u003eWhen creating the user, the password must be encrypted using a one-way method (it should not be possible to decrypt the password);\u003c/li\u003e\n      \u003cli\u003e\u003cstrong\u003eIt should NOT\u003c/strong\u003e be allowed to create users with the same login. When registering, data validation should occur. This validation can happen at the time of data submission, there's no need to validate when leaving the field;\u003c/li\u003e\n      \u003cli\u003eWhen registering the user, validation of the login should occur to ensure that the chosen login is an email;\u003c/li\u003e\n      \u003cli\u003eWhen creating the user, the user creation date should be filled with the current date;\u003c/li\u003e\n      \u003cli\u003eWhen making any changes to the user, the last update date should be filled with the date of the record change (the creation date should remain unchanged);\u003c/li\u003e\n      \u003cli\u003eUsers \u003cstrong\u003eCANNOT\u003c/strong\u003e be deleted, only blocked.\u003c/li\u003e\n    \u003c/ol\u003e\n  \u003c/li\u003e\n\n  \u003cli\u003eCreate a template for user management (the CRUD operations above should be done via a graphical interface):\n    \u003col style=\"list-style-type: upper-alpha;\"\u003e\n      \u003cli\u003eRemember that \"deletion\" will only mark the user as blocked.\u003c/li\u003e\n    \u003c/ol\u003e\n  \u003c/li\u003e\n\n  \u003cli\u003eCreate a login screen template, so that the user can access the system. It should be available at an endpoint \u003ccode\u003e/login\u003c/code\u003e, and accessible from the top navigation bar of the service:\n    \u003col style=\"list-style-type: upper-alpha;\"\u003e\n      \u003cli\u003eIf the user is blocked, \u003cstrong\u003elogin should not be allowed.\u003c/strong\u003e A message should be displayed on the screen informing the user of the fact;\u003c/li\u003e\n      \u003cli\u003eIf the user is successfully authenticated (login and password are correct), the user should be redirected to a homepage (of your choice);\u003c/li\u003e\n      \u003cli\u003eFor now, other endpoints can be accessed directly, \u003cstrong\u003eroutes will not be protected\u003c/strong\u003e at this stage of the assignment.\u003c/li\u003e\n    \u003c/ol\u003e\n  \u003c/li\u003e\n\u003c/ol\u003e\n\n\u003ch2\u003eProject Setup\u003c/h2\u003e\n\u003cp\u003eWe need a few things to run this simple project, that are:\u003c/p\u003e\n\u003col\u003e\n    \u003cli\u003eDownload VScode IDE if you don't have installed;\u003c/li\u003e\n    \u003cli\u003eInstall \u003ca href=\"https://www.python.org/downloads/\"\u003ePython\u003c/a\u003e last version or above 3.0 and reboot your pc;\u003c/li\u003e\n    \u003cli\u003eInstall \u003ca href=\"https://dev.to/dendihandian/installing-sqlite3-in-windows-44eb\"\u003eSQLite3\u003c/a\u003e last version or above 3.40.0 and reboot your pc;\u003c/li\u003e\n    \u003cli\u003eDownload the project .zip or clone it with GitHub, extract all folders in one folder of your choice in your PC;\u003c/li\u003e\n    \u003cli\u003eInside VScode with the project folder open, click \u003ccode\u003eCTRL + SHIFT + `\u003c/code\u003e or type in VScode search bar \u003ccode\u003e\u003eTerminal: create new terminal\u003c/code\u003e and press \u003ccode\u003eEnter\u003c/code\u003e;\u003c/li\u003e\n    \u003cli\u003eWith terminal open, install this libraries using the syntax below, just copy and paste in terminal:\n        \u003col ol style=\"list-style-type: upper-alpha;\"\u003e\n            \u003cli\u003eInstead of downloading all libraries by hand, you can change \u003ccode\u003erequirements.py\u003c/code\u003e extension from \u003ccode\u003e.py\u003c/code\u003e to \u003ccode\u003e.txt\u003c/code\u003e and use the command \u003ccode\u003epip install -r requirements.txt\u003c/code\u003e to download all automatic;\u003c/li\u003e\n            \u003cli\u003e\u003ccode\u003epip install flask\u003c/code\u003e;\u003c/li\u003e\n            \u003cli\u003e\u003ccode\u003epip install bcrypt\u003c/code\u003e;\u003c/li\u003e\n            \u003cli\u003e\u003ccode\u003epip install pysqlite3\u003c/code\u003e;\u003c/li\u003e\n            \u003cli\u003e\u003ccode\u003epip install flask_dance\u003c/code\u003e;\u003c/li\u003e\n            \u003cli\u003e\u003ccode\u003epip install flask-email\u003c/code\u003e;\u003c/li\u003e\n            \u003cli\u003e\u003ccode\u003epip install python-dotenv\u003c/code\u003e;\u003c/li\u003e\n            \u003cli\u003e\u003ccode\u003epip install flask-session\u003c/code\u003e;\u003c/li\u003e\n            \u003cli\u003e\u003ccode\u003epip install flask-babel\u003c/code\u003e.\u003c/li\u003e\n        \u003c/ol\u003e\n    \u003c/li\u003e\n    \u003cli\u003eNow, just open \u003ccode\u003emain.py\u003c/code\u003e and run it with, to run the server you can use two methods:\n        \u003col ol style=\"list-style-type: upper-alpha;\"\u003e\n            \u003cli\u003eYou can install the VScode extension \u003ca href=\"https://marketplace.visualstudio.com/items?itemName=formulahendry.code-runner\"\u003eCode Runner\u003c/a\u003e, with the file open and extension installed, use shortcut \u003ccode\u003eCtrl + Alt + N\u003c/code\u003e to run;\u003c/li\u003e\n            \u003cli\u003eIn the terminal, make sure you are in the right directory and then type: \u003ccode\u003epython main.py\u003c/code\u003e to start server;\u003c/li\u003e\n        \u003c/ol\u003e\n    \u003c/li\u003e\n    \u003cli\u003eThe server/application already have a database file with some data (\u003ccode\u003edatabase.db\u003c/code\u003e), but if you want to start from zero, exclude \u003ccode\u003edatabase.db\u003c/code\u003e file and then access the route \u003ccode\u003e/initdb\u003c/code\u003e to create a new one with all tables and no data inside;\u003c/li\u003e\n    \u003cli\u003eCreate a \u003ccode\u003e.env\u003c/code\u003e file with the parameters below:\n      \u003cpre\u003e\u003ccode\u003e\n        GOOGLE_CLIENT_ID=\"your_Google_API_id\"\n        GOOGLE_CLIENT_SECRET=\"your_Google_client_secret\"\n        GITHUB_CLIENT_ID=\"your_GitHub_API_id\"\n        GITHUB_CLIENT_SECRET=\"your_GitHub_API_password\"\n        MAIL_USERNAME=\"your_e-mail\"\n        MAIL_PASSWORD=\"your_Google_API_password\"\n      \u003c/code\u003e\u003c/pre\u003e\n    \u003c/li\u003e\n    \u003cli\u003eEnjoy exploring!\u003c/li\u003e\n\u003c/ol\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrnicolass%2Flibrary-with-flask","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrnicolass%2Flibrary-with-flask","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrnicolass%2Flibrary-with-flask/lists"}