GithubHelp home page GithubHelp logo

backend-internship-task's Introduction

Backend Internship Task Submission

Code Overview

The code in this repo implements a Flask-based REST API for managing calorie entries. It provides routes for user registration, authentication, creating calorie entries, setting expected calorie per day and retrieving specific calorie entries.

The code consists of the following files and folders:

  1. flask_crud/models: Contains the database models and schema.
  2. flask_crud/routes: Contains the routes
  3. flask_crud/config.py: Configuration file with various settings.
  4. flask_crud/tests: Contains the test files with various settings.
  5. create_tables.py: Script to setup and configure the database, however, running the app (after setting your db_url and other config variables) sets it up either ways.
  6. requirements.txt: File listing the required dependencies and their versions.

Usage Instructions

To run the application locally, follow these steps:

  1. Initialize the python venv by running python3 -m venv new_venv
  • activate it with source new_venv/bin/activate
  1. Install the required dependencies by running pip install -r requirements.txt.
  2. Rename .env.example to .env and put your own details.
  3. Generate the database by running python create_tables.py.
  4. Start the Flask application by running flask run.
  5. Run the tests with python -m unittest flask_crud.tests.unit.test_user
  6. The application will be accessible at http://localhost:4747. 7.When you're done working in the virtual environment, you can deactivate it by running the deactivate command deactivate

Dependencies

The project's major dependencies are:

  • Flask==2.3.2
  • Flask-SQLAlchemy==3.0.0
  • requests==2.31.0

The other dependencies are specified in the requirements.txt file.

Author

The code in this repository was written by Maestroh1Git (David Amaku).

backend-internship-task's People

Contributors

ashwinexe avatar prayashm avatar omprakash95 avatar maestroh1git avatar

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.