Git Product home page Git Product logo

hidb's Introduction

hidb

Home Inventory DataBase

Note: this README is a work in progress.

Setting up for development

The below steps are only meant for running this code in a development environment. If you intend to run this in production, please see "Running in a Production setting" below.

Use Pyenv to manage multiple Python versions.

# Developed using Python 3.9.5
$ pyenv install 3.9.5

# Set up a Python virtualenv
$ python3 -m venv env
$ source env/bin/activate

# Install dependencies
$ pip3 install -r requirements.txt

# Init the db schema
$ flask --app hidb init-db

# Run the app
# The web app will be accessable at http://localhost:5000/
# Add "-host=0.0.0.0" to allow access from the network; otherwise only localhost is allowed
# This should NOT be used in a production environment!
$ flask --app hidb --debug run

# Run unit tests
$ pytest

# Measure code coverage
$ coverage run -m pytest
$ coverage report
$ coverage html

Running in a Production setting

Use one of the supported methods of deploying a Flask app. There are many options available, both commercial/third-party and self-hosted.

# Build release package
$ python setup.py bdist_wheel

This repository also contains the configuration necessary to deploy this app in a Docker container, which is another viable option for hosting this app.

# Build Docker container
# Note: must re-run this command to incorporate changes
$ docker-compose build

# Start up Docker container
$ docker-compose up

# Shut down Docker container
$ docker-compose down

hidb's People

Contributors

dburr avatar ka6sox avatar

Watchers

 avatar  avatar

hidb's Issues

Database Backup

The ability to backup the DB is a good feature

Medium Priority

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.