Giter VIP home page Giter VIP logo

pennapps17-backend's Introduction

PennApps17-backend

Back end for PennApps F17 project

API Documentation

  • GET /user/<username>
    • Retrieves information about user <username> in JSON format.
  • PUT /user/<username>
    • Updates informaton about user <username> from the data in the request body.
  • POST /user/
    • Creates a new user on the server from the data in the request body.

Setup instructions

To setup virtualenv with Python 3.x, navigate to the root directory of this repo and type:

$ virtualenv -p python3 .

Activate virtualenv:

$ source bin/activate

Deactivate virtualenv:

$ deactivate

Note: virtualenv creates a bunch of directories, which have been added to .gitignore. Do not remove them from .gitignore.

Adding and updating dependencies

To add a dependency, simply run pip3 install <dependency_name> from within the virtualenv.

Export the list of dependencies:

$ pip3 freeze -r requirements.txt > requirements.txt

Install or update dependencies from the list:

$ pip install -r requirements.txt

Warning: Do not remove requirements.txt from .gitignore!

Running the server

Before you run it, you must set the FLASK_APP environment variable. Within virtualenv, run:

$ export FLASK_APP=main.py

Then, you can run $ flask run. This works even if you deactivate and re-activate the environment.

pennapps17-backend's People

Contributors

veeara282 avatar

Watchers

 avatar  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.