Azure-docs: Python API Reference for SDK

Created on 8 Oct 2018  Â·  11Comments  Â·  Source: MicrosoftDocs/azure-docs

It would be great to have a full API reference for the Python SDK as well. Particularly since there are differences between what's been implemented in the various SDKs


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

assigned-to-author in-progress iot-husvc product-feedback triaged

All 11 comments

Thanks for the feedback! We are currently investigating and will update you shortly.

@FluxReality I may not have understood the question well. When you search on python sdk in github , can't you find the information you need?

Thanks!

Since we have not heard back from you we will now proceed to close this thread. If there are further questions regarding this matter, please tag me in your reply. We will gladly continue the discussion and we will reopen the issue.

Hi im sorry for such slow reply and that you could not understand my question mr @sergaz-msft . So i will clarify here.

In the devguide. you can see that most other SDKs such as for .NET, C, JAVA and NodeJS, there are separate "API-reference" links, but for python it says "API reference: see C API reference" and the same for iOS.

Now by the structure of this SDK, it seems that the python version is NOT a full implementation of the C-API thus making it hard to follow this documentation.

Therefore, it still would be great if it could be documented in the same way as for the .NET, C, JAVA and node SDKs.

Hello @FluxReality sorry I missed your comment on a timely manner since it was already closed.

I understand your suggestion now :). I believe that Python SDK is very dependent of Azure IoT SDK C and that is why we are pointing it to C API Reference, though I will include the content author @dominicbetts to help us clarify the decision on adding the reference "API reference: see C API reference" instead of a dedicated one.

Thank you so much for your great feedback!

Hi @FluxReality , thanks for the feedback. We are definitely aware of this issue, we have been working with the doc team, but we are running into technical difficulty. Python version is a full implementation of the C-API, where are you seeing discrepancy?

Hi @yzhong94 and thanks for your reply.

It might just be me not being able to navigate or misunderstand the documentation, but if you take a class like IotHubClientand the method set_message_callback It has a few overloads that I can not find in the C-documentation.

And the naming conventions seems different, making search much harder.

Adding @pierreca

@FluxReality: that's absolutely valid feedback.

The best source right now to "discover" the API is a combination of 3 things:

I realize that this response is less than ideal (itborders on the unacceptable for any SDK if you ask me). So I want to provide a little bit of context about the situation we're in and how we're planning to make it better:

Stated simply, the current Python SDK, as it is, (a wrapper over the C SDK) doesn't work well enough for anyone. It's not just a docs thing (the current C wrapper form prevents the docs team from ingesting it), it's a usability problem: we only support a couple of OS configurations and have a slew of external, native dependencies that break the "batteries included" promise of python. It also suffers from many of the C SDK limitations that we shouldn't have (filesystem access, things like that)

Because of that, we are rewriting the SDK entirely in Python, with pythonic APIs, and python docstrings that the docs team will be able to ingest. This also means we are going to deprecate the current SDK and are trying to minimize the efforts around it (and that includes not publishing proper existing API docs), as we're trying to focus on the "right" fix (a whole new SDK, that works better for everyone and would be properly documented.

Again, I realize it's not a good answer, I just hope it unblocks you enough to keep going while we fix this - we're a few weeks out to have something a whole lot better.

Thank you @pierreca for your explanation.

This is actually what I did, and was eventually able to build a python-module that is working. As you point out; - the SDK is buggy, and the fact that the documentation is missing, makes it really hard to find out where the problem is. Is it wrong use of the API or the API itself to blame?

Nevertheless I appreciate the Python SDK, because Python seems like a good fit for this type of solution, with its vast selection of libraries and its easy containerization with docker. It's extremely flexible.

I will be looking forward to the release of the full Pythonic API.

We will now proceed to close this thread. If there are further questions regarding this matter, please tag me in your reply. We will gladly continue the discussion and we will reopen the issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

behnam89 picture behnam89  Â·  3Comments

bityob picture bityob  Â·  3Comments

AronT-TLV picture AronT-TLV  Â·  3Comments

spottedmahn picture spottedmahn  Â·  3Comments

DeepPuddles picture DeepPuddles  Â·  3Comments