Giter Site home page Giter Site logo

plantdaddy-backend's Introduction

PlantDaddy-Backend

REST API for PlantDaddy web app. Leverages a modern, typed Python stack.

Value Prop:

One place with all the info you need to keep the plant alive

Features:

  • Name, classify, categorize, and perform lookups for plants
  • Create PlantGroups
  • Schedule events for watering/care

Stack:

  • FastAPI (api framework)
  • SQLModel (orm)
  • Poetry (dependencies/venv)
  • Black (formatting)
  • Flake8 (linting)
  • MyPy (strong typing)

Contributor Quickstart

Prerequisite: Poetry installation

(VSCode)

  • install Python/Pylance/Toml extensions
  • update poetry virtual environments setting to keep it in the project instead of default location by running: poetry config virtualenvs.in-project true

setup virtual environment

  • Create Virtual Environments with poetry: poetry env use python3.10 and poetry env use python3.9.
  • Activate the venv using poetry shell
  • Install the packages listed in pyproject.toml into your venv using poetry install.

setup database

  • Create a local SQLite database file by creating a file ending in .db.
  • Create a file ".env" in the project root and add the absolute path to your .db file to a variable SQLITE_FILE.

run the server

  • Start the server by running python3 -m app.console from the project root.
  • Alternatively, run from the command line with uvicorn app.api.v1.endpoints.plant:app --reload
  • Test the endpoints by going to the localhost link which appears in the console and appending "/docs" to the URL

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.