Code Monkey home page Code Monkey logo

bird's Introduction

Overview

This is a bird application. It stores and fetches birds in a Mongo-database. It's entirely written in Python with the Flask framework.

The code has only been tested with Python 2.7 on Linux.

Index

  • Requirements
  • Installation
  • MongoDB
  • Running
  • Permanent installation
  • Testing

Requirements

The application is tested on the versions within ().

Languange:

  • Python (2.7)

Modules:

  • Flask (0.10.1)
  • PyMongo (3.0.2)
  • Flask-Testing (0.4.2)

Database:

  • MongoDB (3.0.4)

Installation

Install Python 2.7 and pip with recommended dependencies. $ apt-get update

$ apt-get install python-pip

$ pip install pymongo flask Flask-Testing

MongoDB

A default installation of MongoDB with a password-less connection is expected.

$ apt-get install mongodb

Running

It simply starts with $ python app.py

It runs and listens on http://0.0.0.0:8000

Permanent installation

If the application is to be permanently installed it is recommended to run on with Nginx and Gunicorn in a virtual environment as a WSGI application.

Testing

test.py uses Flask unittest to ensure functionality of the application. It runs 5 simple tests to ensure that we get a HTTP 200 OK from the application.

It requires one bird in the database on first run not to produce any errors. After first run, take the object-id of that bird and add it to the variable: existing_bird_id_url = "/birds/559979dc25d367210c295fef"

Simply run it with $ python test.py

bird's People

Contributors

mohill avatar

Watchers

 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.