Giter VIP home page Giter VIP logo

simpleapi's People

Contributors

djgilcrease avatar flosch avatar hollow avatar safehammad 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  avatar

simpleapi's Issues

The id field of a MongoEngine Document is not serialized

The simpleapi.server.serializer.MongoDocumentSerializer currently doesn't serialize the id.

There is a question as to whether serializing to string or to pymongo.objectid.ObjectId makes sense. There are good arguments either way, however I think the expectation is that MongoEngine documents are serialized to Python built-in types such as string. Also:

  • Serializing the id to string retains compatibility with how simpleapi encodes to JSON/XML etc.
  • MongoEngine will happily accept a string id when querying or saving a Document.
  • An ObjectId object can easily be created in the unlikely event that it is required.

The following change implements serializing id to string:
safehammad/simpleapi@2a415e6

python-dateutil dependency

Installing simpleapi 0.0.8 through pip currently borks if python-dateutil isn't installed. Needs to be added as a requirement to setup.py.

Python/Flask examples not working

None for Python/Flask examples work for me, e.g calculator gives me error:
AssertionError: HTTP-Server returned http code 405 (expected: 200)

HTTP GET works.

Python client POST don't work.

Wireshark from python client:
POST /api/ HTTP/1.0
Content-Type: application/x-www-form-urlencoded
Content-Length: 10
Host: 127.0.0.1:8888
User-Agent: Python-urllib/1.17
_call=test

But Flask server responds:
{"errors": ["Method must be provided."], "success": false}

Cannot serialize Embedded Document

I think the serializer.py cannot serialize if there is any embedded document.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/1192367-cannot-serialize-embedded-document?utm_campaign=plugin&utm_content=tracker%2F290300&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F290300&utm_medium=issues&utm_source=github).

README.rst

In both of the sections covering local python clients, the code will fail with a NameError because Route is not imported from simpleapi.

from simpleapi import DummyClient
from handlers import SMSAPI

client = DummyClient(Route(SMSAPI, framework='dummy'),
                     access_key='mysecret')

...

from simpleapi import DummyClient
from handlers import CalculatorAPI

client = DummyClient(Route(CalculatorAPI, framework='dummy'),
                     access_key='lets_calc')

how can I show the output in utf-8?

I will display the output in utf-8. How can I do this. When I open something like this:

userprofile/list/?_mimetype=text/html&_call=by_id&req_id=1

the 'ü' is shown as \u00fc

can I output this as an 'ü'?

sry for my bad english...

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.