Giter Site home page Giter Site logo

flaskbase's People

Contributors

joestubbs avatar mpackard avatar notchristiangarcia avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

flaskbase's Issues

Flaskbase Server Backend Generalization

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.

Flaskbase Packaging

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:

  1. Check for environment variables, if set, use those.
  2. Look at current Python path, if files exist, use those (issue with the filenames config.json and configschema.json, they could already be used by another project.
  3. Look at /home/tapis, if files exist, we use that.
  4. Fallback to defaults and throw a log message.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.