Git Product home page Git Product logo

Comments (3)

grayside avatar grayside commented on May 26, 2024 1

I thought the purpose of structured events was to more easily pass CloudEvents in a transport agnostic manner. If so, shouldn't the API be shaped towards that use case?

from sdk-python.

cumason123 avatar cumason123 commented on May 26, 2024

A user does not need to know if the event is structured or binary when creating a cloudevent with this framework. For example, this sample server will internally decipher both binary and structured events.

There may exist a use case in which a user may want to determine if some request is binary or structured (possibly testing/debugging purposes). Additionally, I'm not all too familiar with the other protocols but I suspect the current implementations for is_binary and is_structured are oriented towards http specific fields. Therefore I wanted to export these fields to the http module. Such that a user could easily access these methods if they wanted to do so, and the methods are in the more appropriate http namespace.

Let me know if that addressed your question!

from sdk-python.

grayside avatar grayside commented on May 26, 2024

After further conversation, I understand that binary and structured events are defined per transport type, so including them in http makes sense.

from sdk-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.