An example file showing a simple endpoints like a login/logout function and maybe some others.

Overview

Flask API Example

An example project showing a simple endpoints like a login/logout function and maybe some others.

How to use:

  • Open up your IDE (or use CMD prompt and go to the directory where this is)
  • In the terminal, run pip3 install -r requirements.txt
  • Run main.py to start the flask development server.
  • Navigate to http://127.0.0.1:5000/ on your browser.
  • The default login for the test account is
    • Username: test_user
    • Password: password

Notes:

  • This doesn't use a database. It's literally a python dictionary holding the data, so if you restart the main.py, the session you have will die. Obviously once we're using a MongoDB the session will be stored there and not deleted constantly.

  • If you have any problems just let me know. It's a complicated to thing to look at your first glance, but it gets really easy. You'll definitely see REST or other types of JSON APIs in the future. It's really common with massive companies so they can just use a basic API to hook their sites, phone apps, and other devices to avoid wasting resources reinventing the same functions they've already got.

  • I'm free to help most of the time and if you just want to toss the API work onto me, I'm fine with. I love this stuff.

  • The code should be well commented, but if anything is confusing please say. At the very least you should get an idea. If you can't launch it I can just show you on a screenshare or in person.

  • test.py is an example using the requests module to interact with the API. The HTML & JS should work fine though.

  • The HTML is basically as plain as it gets and same with the javascript. I'm not a great front-end developer.

You might also like...
๐Ÿ”ฉ Like builtins, but boltons. 250+ constructs, recipes, and snippets which extend (and rely on nothing but) the Python standard library. Nothing like Michael Bolton.

Boltons boltons should be builtins. Boltons is a set of over 230 BSD-licensed, pure-Python utilities in the same spirit as โ€” and yet conspicuously mis

๐Ÿ”ฉ Like builtins, but boltons. 250+ constructs, recipes, and snippets which extend (and rely on nothing but) the Python standard library. Nothing like Michael Bolton.

Boltons boltons should be builtins. Boltons is a set of over 230 BSD-licensed, pure-Python utilities in the same spirit as โ€” and yet conspicuously mis

An example project that shows how to check if a certain macro is active in a file.

PlatformIO Check Compiler Flags Example Description Demonstrates the usage of an extra script and a special compilter invocation to get the active mac

MiniJVM is simple java virtual machine written by python language, it can load class file from file system and run it.

MiniJVM MiniJVMๆ˜ฏไธ€ๆฌพไฝฟ็”จpython็ผ–ๅ†™็š„็ฎ€ๆ˜“JVM๏ผŒ่ƒฝๅคŸไปŽๆœฌๅœฐๅŠ ่ฝฝclassๆ–‡ไปถๅนถไธ”ๆ‰ง่กŒ็ปๅคงๅคšๆ•ฐๆŒ‡ไปคใ€‚ ๆ”ฏๆŒ็š„ๅŠŸ่ƒฝ 1.ไปŽๆœฌๅœฐ็ฃ็›˜ๅŠ ่ฝฝclassๅนถ่งฃๆž 2.ๆ”ฏๆŒ็ปๅคงๅคšๆ•ฐๆŒ‡ไปค้›†็š„ๆ‰ง่กŒ 3.ๆ”ฏๆŒ่™šๆ‹Ÿๆœบๅ†…ๅญ˜ๅˆ†ๅŒบไปฅๅŠๅฏน่ฑก็š„ๅˆ›ๅปบ 4.ๆ”ฏๆŒๆ–นๆณ•็š„่ฐƒ็”จๅ’Œๅ‚ๆ•ฐไผ ้€’ 5.ๆ”ฏๆŒ้™ๆ€ไปฃ็ ๅ—็š„ๅˆๅง‹ๅŒ– ไธๆ”ฏ

A C-like hardware description language (HDL) adding high level synthesis(HLS)-like automatic pipelining as a language construct/compiler feature.
A C-like hardware description language (HDL) adding high level synthesis(HLS)-like automatic pipelining as a language construct/compiler feature.

โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•”โ•โ•โ•โ•โ•โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•”โ•โ•โ•โ•โ•โ–ˆโ–ˆโ•”โ•โ•โ•โ•โ• โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ–ˆ

Vehicle Identification Speed Detection (VISD) extracts vehicle information like License Plate number, Manufacturer and colour from a video and provides this data in the form of a CSV file
Vehicle Identification Speed Detection (VISD) extracts vehicle information like License Plate number, Manufacturer and colour from a video and provides this data in the form of a CSV file

Vehicle Identification Speed Detection (VISD) extracts vehicle information like License Plate number, Manufacturer and colour from a video and provides this data in the form of a CSV file. VISD can also perform vehicle speed detection on a video. All these features of VSID are provided to the user using a Web Application which is created using Flask

Monitor the New World login queue and notify when it is about to finish
Monitor the New World login queue and notify when it is about to finish

nwwatch - Monitor the New World queue and notify when it is about to finish Getting Started install python 3.7+ navigate to the directory where you un

A browser login credentials thief for windows and Linux

Thief ๐Ÿฆน๐Ÿป A browser login credentials thief for windows and Linux Python script to decrypt login credentials from browsers in windows or linux Decryp

A python script that will automate the boring task of login to the captive portal again and again

A python script that will automate the boring task of login to the captive portal again and again

Owner
Kevin
Kevin
InfiniPy has some neat features - like the endpoint for function

InfiniPy has some neat features - like the endpoint for function

ZeroTwo 7 Nov 20, 2022
little proyect to organize myself, but maybe can help someone else

TaskXT 0.1 Little proyect to organize myself, but maybe can help someone else Idea The main idea is to ogranize you work and stuff to do, but with onl

Gabriel Carmona 4 Oct 3, 2021
Serverless demo showing users how they can capture (and obfuscate) their Lambda payloads in Datadog APM

Serverless-capture-lambda-payload-demo Serverless demo showing users how they can capture (and obfuscate) their Lambda payloads in Datadog APM This wi

Datadog, Inc. 1 Nov 2, 2021
Basic repository showing how to use Hydra + Hydra launchers on SLURM cluster

Slurm-Hydra-Submitit This repository is a minimal working example on how to: setup Hydra setup batch of slurm jobs on top of Hydra via submitit-launch

Raphael Meudec 2 Jul 25, 2022
Type Persian without confusing words for yourself and others, in Adobe Connect

About In the Adobe Connect chat section, to type in Persian or Arabic, the written words will be confused and will be written and sent illegibly (This

Matin Najafi 23 Nov 26, 2021
Users can read others' travel journeys in addition to being able to upload and delete posts detailing their own experiences

Users can read others' travel journeys in addition to being able to upload and delete posts detailing their own experiences! Posts are organized by country and destination within that country.

Christopher Zeas 1 Feb 3, 2022
The purpose of this script is to bypass disablefund, provide some useful information, and dig the hook function of PHP extension.

The purpose of this script is to bypass disablefund, provide some useful information, and dig the hook function of PHP extension.

Firebasky 14 Aug 2, 2021
a bit of my project :) and I use some of them for my school lesson or study for an exam! but some of them just for myself.

Handy Project a bit of my project :) and I use some of them for my school lesson or study for an exam! but some of them just for myself. the handy pro

amirkasra esmaeilian 13 Jul 5, 2021
This is a simple quizz which can ask user for login/register session, then consult to the Quiz interface.

SIMPLE-QUIZ- This is a simple quizz which can ask user for login/register session, then consult to the Quiz interface. By CHAKFI Ahmed MASTER SYSTEMES

CHAKFI Ahmed 1 Jan 10, 2022
๐Ÿค–๐Ÿค– Jarvis is an virtual assistant which can some tasks easy for you like surfing on web opening an app and much more... ๐Ÿค–๐Ÿค–

Jarvis ?? ?? Jarvis is an virtual assistant which can some tasks easy for you like surfing on web opening an app and much more... ?? ?? Developer : su

null 1 Nov 8, 2021