mostafa / grest Goto Github PK
View Code? Open in Web Editor NEWBuild REST APIs with Neo4j and Flask, as quickly as possible!
Home Page: http://grest.readthedocs.io/
License: GNU General Public License v3.0
Build REST APIs with Neo4j and Flask, as quickly as possible!
Home Page: http://grest.readthedocs.io/
License: GNU General Public License v3.0
We should put version at the base of our framework URLs, like this:
api/v1/resource/{id}.json
Add Flask-Marshmallow to make the API HATEOAS-ready.
This should be added to Travis-CI builds.
Update errors and make them more descriptive.
Use poetry for packaging.
API design, RAML, swagger, API documentation, whatever!
I've recently stumbled upon a good project called docsify. I think we can use it to generate documents. Read the Docs is also one of the options available.
Useful ones should be selected based on popularity and ease of use:
Serialization Formats
1- as part of URL: /api/v2/tests/{id}.json
2- as ACCEPT
header field.
Accepted response format should be specified using ACCEPT
header fields.
Later the Content-Type should also be added with serialization options to accept types than JSON.
We can make the framework so flexible that it can make use of any OGM/ORM other than neomodel. First we should add support for other OGMs to support other graph-based databases, and then add support for ORMs, e.g.:
TinkerPop 3 Gremlin Server:
mogwai
Goblin OGM
OrientDB:
PyOrient OGM
DELETE verb on top-level resource should be used to delete all resources (in bulk).
Make a command-line script to generate scaffold for microservices.
Fix validation_rules property to use data-types of the model (bind them together somehow!). It should be rewritten and should be conformant to issue #4 .
POST/PUT verb on top-level resource should be used to add/update resources in bulk.
The output of the mypy
command:
$ mypy .
grest/models.py:22: error: Skipping analyzing 'neomodel': found module but no type hints or library stubs
grest/models.py:26: error: Skipping analyzing 'webargs': found module but no type hints or library stubs
grest/models.py:30: error: Need type annotation for '__validation_rules__' (hint: "__validation_rules__: Dict[<type>, <type>] = ...")
setup.py:24: error: Skipping analyzing 'setuptools': found module but no type hints or library stubs
setup.py:31: error: Item "None" of "Optional[Match[str]]" has no attribute "group"
grest/validation.py:21: error: Module 'urllib.request' has no attribute 'unquote'
grest/validation.py:24: error: Skipping analyzing 'webargs.flaskparser': found module but no type hints or library stubs
grest/utils.py:21: error: Skipping analyzing 'dicttoxml': found module but no type hints or library stubs
grest/verbs/put.py:20: error: Module 'urllib.request' has no attribute 'unquote'
grest/verbs/put.py:22: error: Skipping analyzing 'neomodel': found module but no type hints or library stubs
grest/verbs/put.py:23: error: Skipping analyzing 'neomodel.exception': found module but no type hints or library stubs
grest/verbs/post.py:20: error: Module 'urllib.request' has no attribute 'unquote'
grest/verbs/post.py:22: error: Skipping analyzing 'neomodel': found module but no type hints or library stubs
grest/verbs/post.py:23: error: Skipping analyzing 'neomodel.exception': found module but no type hints or library stubs
grest/verbs/patch.py:20: error: Module 'urllib.request' has no attribute 'unquote'
grest/verbs/patch.py:22: error: Skipping analyzing 'neomodel': found module but no type hints or library stubs
grest/verbs/patch.py:23: error: Skipping analyzing 'neomodel.exception': found module but no type hints or library stubs
grest/verbs/index.py:22: error: Skipping analyzing 'neomodel.exception': found module but no type hints or library stubs
grest/verbs/index.py:23: error: Skipping analyzing 'webargs': found module but no type hints or library stubs
grest/verbs/get.py:20: error: Module 'urllib.request' has no attribute 'unquote'
grest/verbs/get.py:24: error: Skipping analyzing 'neomodel.exception': found module but no type hints or library stubs
grest/verbs/delete.py:20: error: Module 'urllib.request' has no attribute 'unquote'
grest/verbs/delete.py:22: error: Skipping analyzing 'neomodel': found module but no type hints or library stubs
grest/verbs/delete.py:23: error: Skipping analyzing 'neomodel.exception': found module but no type hints or library stubs
grest/grest.py:28: error: Skipping analyzing 'neomodel': found module but no type hints or library stubs
grest/grest.py:29: error: Skipping analyzing 'flask_classful': found module but no type hints or library stubs
grest/grest.py:31: error: Skipping analyzing 'autologging': found module but no type hints or library stubs
tests/test_validation_rules_property.py:21: error: Skipping analyzing 'neomodel': found module but no type hints or library stubs
tests/test_validation_rules_property.py:22: error: Skipping analyzing 'webargs': found module but no type hints or library stubs
tests/test_validation_rules_property.py:27: error: Name 'StructuredNode' is not defined
tests/test_validation_rules_property.py:34: error: Name 'UniqueIdProperty' is not defined
tests/test_validation_rules_property.py:35: error: Name 'StringProperty' is not defined
tests/test_validation_rules_property.py:36: error: Name 'StringProperty' is not defined
tests/test_validation_rules_property.py:37: error: Name 'IntegerProperty' is not defined
tests/test_validation_rules_property.py:38: error: Name 'JSONProperty' is not defined
tests/test_validation_rules_property.py:39: error: Name 'ArrayProperty' is not defined
tests/test_validation_rules_property.py:39: error: Name 'StringProperty' is not defined
tests/test_validation_rules_property.py:40: error: Name 'ArrayProperty' is not defined
tests/test_validation_rules_property.py:41: error: Name 'DateProperty' is not defined
tests/test_validation_rules_property.py:42: error: Name 'DateTimeProperty' is not defined
tests/test_validation_rules_property.py:43: error: Name 'BooleanProperty' is not defined
tests/test_validation_rules_property.py:44: error: Name 'EmailProperty' is not defined
examples/extended_app.py:26: error: Skipping analyzing 'neomodel': found module but no type hints or library stubs
examples/extended_app.py:28: error: Skipping analyzing 'flask_classful': found module but no type hints or library stubs
examples/extended_app.py:32: error: Skipping analyzing 'webargs': found module but no type hints or library stubs
examples/app.py:24: error: Skipping analyzing 'neomodel': found module but no type hints or library stubs
examples/app.py:24: note: See https://mypy.readthedocs.io/en/latest/running_mypy.html#missing-imports
examples/app.py:27: error: Skipping analyzing 'webargs': found module but no type hints or library stubs
Found 47 errors in 14 files (checked 24 source files)
perhaps this is obvious, but I can't get the grest command to work. Using MacOS Catalina, python 3
grest boop
zsh: //usr/local/Cellar/[email protected]/3.7.10_3/Frameworks/Python.framework/Versions/3.7/bin/grest: bad interpreter: c:\Python27\python.exe^M: no such file or directory
Like this:
{
"metadata": {
"resultset": {
"count": 227,
"offset": 25,
"limit": 25
}
},
"results": []
}
According to @pylover, we should use Travis CI and coverrals.
While using POST and PUT to either create a new or update the existing relationship between two models, we should include any extra information needed for the relation, as stated here in Properties section.
The whole source code should be made conformant to PEP-8 standard of python.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.