Code Monkey home page Code Monkey logo

Comments (7)

walkah avatar walkah commented on July 30, 2024

I'm all for it! I know that @jmathai was hoping to keep the various libraries fairly consistent. Jaisen, I think this would make the client much easier to use - can we start with Python and revisit the other libraries?

from openphoto-python.

sneakypete81 avatar sneakypete81 commented on July 30, 2024

Sorry, I'm still learning the GitHub flow.. consider this a duplicate of my pull request in issue #13!

from openphoto-python.

jmathai avatar jmathai commented on July 30, 2024

@walkah @sneakypete81 No opposition from me. Whatever makes the most sense for Python devs is > than my philosophical desire to keep the libraries consistent :)

from openphoto-python.

walkah avatar walkah commented on July 30, 2024

Cool. I'll review the pull request then when I get a chance. @jmathai maybe I'll have a look at bringing some of the other libraries in line - cake and eat it too ;-)

from openphoto-python.

jmathai avatar jmathai commented on July 30, 2024

@walkah Possible to leave them backwards compatible for a few versions?

from openphoto-python.

walkah avatar walkah commented on July 30, 2024

I would think that's a very good idea, yes.

from openphoto-python.

sneakypete81 avatar sneakypete81 commented on July 30, 2024

Makes sense to me. Most of my changes are additions rather than modifications to existing behaviour, but you can consider whether or not to include the following modifications to the get() and set() method behaviour:

  1. Parameters are passed in as keywords rather than a single dictionary: get(endpoint, param1=value1, param2=value2) instead of get(endpoint, {"param1": value1, "param2": value2}).
  2. Lists and boolean parameters are handled correctly. This doesn't affect compatibility, and seems like a good idea.
  3. The HTTP response is (optionally) parsed to a dict. The old behaviour can still be requested by specifying "process_response=False". We could make this the default if you like - I chose to make the default "True" since a dict is more useful than a JSON string.
  4. Error response codes (optionally) raise exceptions. As above.

from openphoto-python.

Related Issues (20)

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.