Content-Length: 298656 | pFad | http://github.com/mozartilize/quora-api

48 GitHub - mozartilize/quora-api: Quora-liked API in Flask
Skip to content

mozartilize/quora-api

Repository files navigation

Build Status codecov

Requirements

  • Python 3.6
  • Poetry
  • Docker

Setup

  1. Install packages:
../src$ poetry install
  1. Create database service
docker service create \
--name quoradb \
--mount type=volume,source=quoradb,destination=/var/lib/postgresql/data \
-p 5001:5432 \
-e POSTGRES_PASSWORD=quora \
-e POSTGRES_USER=quora \
-e POSTGRES_DB=quora_development postgres:9.6

Run

../src$ FLASK_ENV=development flask run

Application structure

This project is where I try something new about SQLAlchemy core, that means there is no more ORM.

  • tables/ contains all table definitions. Any change will be detected by Alembic for migrations.
  • repository/ is where queries executed and data retrieved
  • schemas/ is where user input data validated and data serialization

Flows

users post data ---> endpoints ---> (schemas, repository) ---> database(tables)

users request resources ---> endpoints ---> (repository, schemas) ---> return resources

Guideline

This project uses pylint and editorconfig for coding style check

Releases

No releases published

Packages

No packages published








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/mozartilize/quora-api

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy