summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Pipfile3
-rw-r--r--Pipfile.lock38
-rw-r--r--fatcat/__init__.py2
-rw-r--r--fatcat/models.py3
4 files changed, 41 insertions, 5 deletions
diff --git a/Pipfile b/Pipfile
index e687ad00..30b13da3 100644
--- a/Pipfile
+++ b/Pipfile
@@ -17,6 +17,9 @@ SQLAlchemy = "*"
requests = "*"
Flask-SQLAlchemy = "*"
raven = "*"
+flask-sqlalchemy = "*"
+marshmallow-sqlalchemy = "*"
+flask-marshmallow = "*"
[requires]
python_version = "3.5"
diff --git a/Pipfile.lock b/Pipfile.lock
index 2e714deb..92e996d9 100644
--- a/Pipfile.lock
+++ b/Pipfile.lock
@@ -1,7 +1,7 @@
{
"_meta": {
"hash": {
- "sha256": "21db1db2bb4d5ecc8dc74166d0ab3ded45afb4e2a91326011e57eb07941bccce"
+ "sha256": "c85f985c9c8abef400882b32783456d808aa554950f6d444947ec2c0dd5884d4"
},
"pipfile-spec": 6,
"requires": {
@@ -45,6 +45,14 @@
"index": "pypi",
"version": "==0.12.2"
},
+ "flask-marshmallow": {
+ "hashes": [
+ "sha256:7fefe98ba8088437e3cd940c813d2f71661da00f041826456cc1ae7c5250bf34",
+ "sha256:d1457a8ee4cda662b121baacb22267774f3f7834e4adafae606b259bfbeb46b9"
+ ],
+ "index": "pypi",
+ "version": "==0.8.0"
+ },
"flask-sqlalchemy": {
"hashes": [
"sha256:3bc0fac969dd8c0ace01b32060f0c729565293302f0c4269beed154b46bec50b",
@@ -79,6 +87,21 @@
],
"version": "==1.0"
},
+ "marshmallow": {
+ "hashes": [
+ "sha256:8740ada95f47fa19f905772aa4932dc5512226a90c30da5672d6d6bf3dd791a7",
+ "sha256:d3f31fe7be2106b1d783cbd0765ef4e1c6615505514695f33082805f929dd584"
+ ],
+ "version": "==2.15.0"
+ },
+ "marshmallow-sqlalchemy": {
+ "hashes": [
+ "sha256:3e034964d09d1af15f6868a36cc26ec22d41a703e576928ba086996ae4287e59",
+ "sha256:9804ef2829f781f469a06528d107c2a763f109c687266ab8b1f000f9684184ae"
+ ],
+ "index": "pypi",
+ "version": "==0.13.2"
+ },
"raven": {
"hashes": [
"sha256:738a52019d01955d5b44b49d67c9f2f4cedb1b4f70d4fb0b493931174d00e044",
@@ -95,6 +118,13 @@
"index": "pypi",
"version": "==2.18.4"
},
+ "six": {
+ "hashes": [
+ "sha256:70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9",
+ "sha256:832dc0e10feb1aa2c68dcc57dbb658f1c7e65b9b61af69048abc87a2db00a0eb"
+ ],
+ "version": "==1.11.0"
+ },
"sqlalchemy": {
"hashes": [
"sha256:7cb00cc9b9f92ef8b4391c8a2051f81eeafefe32d63c6b395fd51401e9a39edb"
@@ -303,11 +333,11 @@
},
"pexpect": {
"hashes": [
- "sha256:67b85a1565968e3d5b5e7c9283caddc90c3947a2625bed1905be27bd5a03e47d",
- "sha256:6ff881b07aff0cb8ec02055670443f784434395f90c3285d2ae470f921ade52a"
+ "sha256:9783f4644a3ef8528a6f20374eeb434431a650c797ca6d8df0d81e30fffdfa24",
+ "sha256:9f8eb3277716a01faafaba553d629d3d60a1a624c7cf45daa600d2148c30020c"
],
"markers": "sys_platform != 'win32'",
- "version": "==4.4.0"
+ "version": "==4.5.0"
},
"pickleshare": {
"hashes": [
diff --git a/fatcat/__init__.py b/fatcat/__init__.py
index b3a82a0f..74e25f1e 100644
--- a/fatcat/__init__.py
+++ b/fatcat/__init__.py
@@ -1,10 +1,12 @@
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
+from flask_marshmallow import Marshmallow
from config import Config
app = Flask(__name__)
app.config.from_object(Config)
db = SQLAlchemy(app)
+ma = Marshmallow(app)
from fatcat import routes, models, api, sql, dummy
diff --git a/fatcat/models.py b/fatcat/models.py
index ce7e2e13..aeb3623b 100644
--- a/fatcat/models.py
+++ b/fatcat/models.py
@@ -12,7 +12,8 @@ possible refactors:
- use mixins for entities
"""
-from fatcat import db
+from marshmallow import post_load
+from fatcat import db, ma
### Inter-Entity Relationships ###############################################