Coder Social home page Coder Social logo

godfather-is-me / flexibleframeworks Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 1.0 110.74 MB

Python 85.03% Shell 0.01% C 0.99% Cython 2.91% C++ 4.64% Batchfile 0.01% HTML 0.48% JavaScript 4.12% CSS 1.03% Jupyter Notebook 0.65% Jinja 0.09% Less 0.01% Fortran 0.01% Smarty 0.02% XSLT 0.01% VBScript 0.01% Classic ASP 0.01% PowerShell 0.02%

flexibleframeworks's Introduction

FlexibleFrameworks

Using flexible templates made by the user to store and retreive noSQL data from the cloud (FireStore). This an example is used to demonstrate dynamic UI to define templates for data storage and retreival


Virtual environment

To use the streamlit app, use the virtual environment along with Python 3.9. To create the environment, navigate to the folder of the working directory and use the following command in the command prompt

python -m venv <Folder name here>

And to activate the environment, navigate through the environment using

<Folder name>/Scripts

And type activate in the terminal to activate the environment. And deactivate to deactivate it when required.


Run Streamlit App

To run the streamlit app simply navigate back to the working directory and run the following commands

pip install -r requirements.txt
streamit run main.py


Directory Structure

Below is the directory structure of the web app

main
├── Readme.md
├── main.py
├── Authentication.py
├── T1.py
├── T2.py
├── T3.py
├── AddButton.py
└── Outcome.py

main.py is the main file which navigates across the several pages. It is also where the sidebar is initiated and kept constant throughout the app


Authentication.py is the file used to authenticate the database with the server using private/secret keys


T1.py and T2.py are dummy templates used for testing and creating new templates as when required manually. It contains the basic code for sending and retreiving files from the FireStore server (NoSQL database)


T3.py is the template with flexible UI which allows the user to add new input fields when necessary. It is made in conjuction with AddButton.py and store all input information in a dictionary with the following structure:

  • {<input field name> : [<function call>, <field value>]}

AddButton.py acts as a plus button to Template 3 which allows the user to add input fields when necessary and modify the template in real time. Current modification allows user to add either text input or number input.

Constraints

  • The NoSQL database relies on the student number being the Unique identifier to each document (as defined by the user) and therefore requires to input a different student number with every form. (Can be changed with design, constraint to only current program)
  • The code also relies on sending and retrieval of data via a private key to its corresponding firestore account. To ensure the code works in your system, create a firestore account and add the private-key.json file to the parent directory of the working folder.

Useful Links

Live project

Use the following link to find the deployed projected interacting with the server

With the help of the outcome page you can see the retreived data

flexibleframeworks's People

Contributors

godfather-is-me avatar

Watchers

 avatar

Forkers

trellixvulnteam

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.