Coder Social home page Coder Social logo

pyresto's People

Contributors

arturdryomov avatar berkerpeksag avatar byk avatar cihann avatar dependabot[bot] avatar metaperl avatar msabramo avatar samet 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pyresto's Issues

Parameterize Requests client settings

When using Pyresto against services that do not default to application/json, the client fails. With its current configuration, it also will fail against self-signed certificates.

Adding a parameter to the model to set the Accept header and SSL verification would enable access to a wider number of REST endpoints.

Fix RuntimeErrors in test_core.TestManyLazy and test_core.TestManyList

(from https://travis-ci.org/berkerpeksag/pyresto/jobs/3699687)

test_iterator (tests.test_core.TestManyLazy) ... Exception RuntimeError: 'maximum recursion depth
exceeded in __subclasscheck__' in <type 'exceptions.AttributeError'> ignored
Exception RuntimeError: 'maximum recursion depth exceeded in __subclasscheck__' in <type 
exceptions.AttributeError'> ignored
ok

test_iterator (tests.test_core.TestManyList) ... Exception RuntimeError: 'maximum recursion depth
exceeded in __subclasscheck__' in <type 'exceptions.AttributeError'> ignored
Exception RuntimeError: 'maximum recursion depth exceeded in __subclasscheck__' in <type
'exceptions.AttributeError'> ignored
ok

httplib2 as backend

Pyresto should use httplib2 for its backend to exploit its advanced features like aggressive and proper caching(with memcached support), simplified authentication support and more elegant interface.

Add HAL support

Add HAL support for almost "definitionless" API library generation and traversal.

Create proper documentation

Create proper documentation about how pyresto works, how someone can use it to wrap a RESTFul interface and how the sample GitHub module is implemented.

Infinite loop on non-existing attributes

When we create an empty model object, like

m = Model()

and then will try to get any attribute (which is obviously not exist)
we will get into infinite recursion call (in getattr)

but probably it should raise AttributeError instead?

Python 3 Compatibility

For the project to be future proof, it should be compatible with Py3k. If possible this should be done in a manner which does not break backwards compatibility with Python 2.7 but if necessary a new module/branch should be created.

How to get list of objects?

I'd like to know how should I retrieve a list of objects from api:

for user in GitHub.User.list():
    print user

GitHub.User.get() seems to be only working with dict objects from response.

P.S. Thank you for releasing this library!

Authentication support

Some API's require authentication in someway to allow writes. Some require authentication even for reading so authentication support is crucial for success.

Lazy loading for Many relationship

In the current implementation, when an api response provides a "continuation url" like GitHub does in the "Link" header under the name of "next", Model._rest_call method calls all the continuation urls iteratively and returns a merged result using the "+" operator. Although this approach is usually good, in some cases like getting all commits of a project, it takes too much time and usually unncessary resources since the needed subset of commits are usually the ones on the first "pages".

What needs to be done is to make this behavior at least optional or to switch to a "lazy loading" model where the current "WrappedList" approach may be replaced with an "iterator" approach. The first part needing change is the Model._rest_call method and the second part is the Many relationship.

Full test coverage

The library must have a complete and through test suite to ensure it's robustness and quality.

Fix unicode problems on path formatting

All paths should automatically be converted into unicode strings to prevent any problems while formatting them with unicode strings. One such example is @leereilly's repos/branches/commits causing problems since there is at least one unicode character in the variables used to format paths.

BzAPI server on which your software depends is going away

Hi,

This bug has been filed because a code search has revealed that code in this repository is using "BzAPI", the Bugzilla API proxy server at https://api-dev.bugzilla.mozilla.org/.

This service is due to be decommissioned. Fortunately, Bugzilla has a new native REST API which works somewhat similarly that you could use instead:
https://wiki.mozilla.org/Bugzilla:REST_API

Moving to that new API would require some porting work. If that seems like too much effort, fear not, because there is also a BzAPI compatibility layer built on top of the new API. Because it's compatible, using that should simply require a change of API endpoint.

Change:
https://api-dev.bugzilla.mozilla.org/latest/
(or https://api-dev.bugzilla.mozilla.org/1.3/)
to
https://bugzilla.mozilla.org/bzapi/

You should not expect the api-dev server to continue to work after Friday 14th November. So please test and migrate your production instance(s) over before then, either to the BzAPI compatibility endpoint or to the new native REST API.

Thanks for using BzAPI. It's been a great ride :-)

Gerv

Foursquare API v2 implementation

It seems Foursquare has different design goals and although I'm not into some of them like abandoning full REST interface compatibility(aka the verbs) it will be good if we can implement this API via Pyresto. This may require some internal changes in the core module which is okay if it persists compatibility with a better API like GitHub's.

Compliance with PEP8

The code should fully comply with PEP8 standards for wider adoption and to make it easier to contribute for other developers.

Switch to Requests

Using requests would help with below:

  • Easier testing since we only need to stub methods on the module instead of trying to hijack classes.
  • Easier authentication for APIs requiring this, including OAuth support.
  • Simpler HTTP interfacing code.
  • Easier API root definitions.

Better package layout

Pyresto should have a directory layout to represent a package for it to be easily used in other projects(like github-badge =)).

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.