exotech-code / portend Goto Github PK
View Code? Open in Web Editor NEWSimple python backend for my portfolio
License: MIT License
Simple python backend for my portfolio
License: MIT License
Make a function that authenticates the admin token required by all of the admin panel's APIs. Also it will have a token expiration function as proposed in issue #13.
Create an API that returns a token on successful login. All other APIs in the admin panel will require the frontend to provide this token with every call.
If too many values have been requested, return empty objects in the amount that exceeds how many of them have been actualy returned from the database.
Before I didn't know that JSON lists of objects are formatted with square brackets. I will attempt to fix the output formatting for my list of dicts with Python's native JSON library. If that won't work, I will create my own solution for this problem.
This will be part of the Python-Flask API. The string inside 'content' part of the post object will be compiled from Markdown into HTML. Then the HTML string will be used by the function, that stores new post in the database.
I need to create an API for uploading photos and fetching already present photos on the server. A photo will be saved to a web server and its location will be saved in images table in the database (this is POST API). If I would like to use the same photo in two places, a GET call (to the same API) will be used to fetch information about all photos currently saved on the server. Then I will be able to select the desired photo from the list in the file uploader component.
I need to make two new HTTP APIs.
Instead of having a function connect every time it makes a request use shared connections.
For example update function should initialize a connection and pass that connection to fetchResults()
when it needs to get anything back from the database.
I could enable that functionality by editing the fetchResults()
like so:
def fetchResults(connection=connectToDB(), query):
I need to create a multistage Docker build that will combine my backend and frontend under the same proxy. This way I will be able to serve API and frontend on the same port.
Right now an user has access to admin panel for an infinite amount of time after he/she has logged in. The admin token has to be ephemeral in order to be secure. In this case I need to build a function that checks how old the token is on every token validation. If it's older than one day, the token validation function will cause the requested API to return HTTP 401 code. Frontend then will redirect user to login page, where he/she can get a new token.
I want Portend to be able to retrieve all posts from MySQL database. In order to do that I have to use mysql-connector-python. It is basically the same thing that I have used for C++.
After connecting to a db and retrieving all the data I need. Portend needs to present it as an easily ingestible JSON endpoint. For this purpose I will use Flask
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.