tapis-project / flaskbase Goto Github PK
View Code? Open in Web Editor NEWCore Python library for building Tapis v3 APIs using flask.
Core Python library for building Tapis v3 APIs using flask.
Useful to generalize Flaskbase so that it can be used with Flask (already done), Django, FastAPI, and anything else in the future.
This allows developers to use the server type of their liking when creating a Tapis V3 app of their own.
Issues. It's hard, we're presently using Flask and it's functionality for Tapipy and Flaskbase. We make use of the g
object provided by Flask. It's a thread locale variable that is created uniquely for each request and deleted post request. This makes it unnecessary to move data we need through each function.
The data
that we need is derived in auth.py
of Flaskbase, in the add_headers()
function. Primarily it looks like we need to move X-Tapis-Token
, X-Tapis-Tenant
, X-Tapis-User
, and X-Tapis-User-Token-Hash
.
So we need to somehow create a request-lived global object that can be used by every function during the lifespan of that request.
Flask has g
,
Django has arbitrary attributes
,
FastAPI hasn't been researched yet.
Most importantly we should look into Flaskbase and see which functions are actually being used. Tapipy does most of the stuff users/services need, if we can just upgrade Tapipy with those additional features, then Flaskbase can kind of be turned into legacy, or it can be home to all of the more complicated functions that a smaller edge case of services/people might need.
Path references are the crux here, Flaskbase needs access to config.json
and configschema.json
to work. Both are already declared with environment variables though. So the process of getting the correct paths looks like:
config.json
and configschema.json
, they could already be used by another project.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.