Code Monkey home page Code Monkey logo

grest's People

Contributors

fossabot avatar gitter-badger avatar mostafa avatar pylover avatar pyup-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

grest's Issues

Add versioning support

We should put version at the base of our framework URLs, like this:
api/v1/resource/{id}.json

Add other serializers for output (XML, ...)

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.

Fix validation_rules property

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 .

Add type annotation

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)

using grest command

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

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.