# Importing python library - the wrong way?

**URL:** <https://forum.inductiveautomation.com/t/importing-python-library-the-wrong-way/40527>\
**Category:** Maker\
**Created:** [November 11, 2020, 1:02pm UTC](https://forum.inductiveautomation.com/t/importing-python-library-the-wrong-way/40527 "2020-11-11T13:02:07Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [November 11, 2020, 4:55pm UTC](https://forum.inductiveautomation.com/t/importing-python-library-the-wrong-way/40527/3 "2020-11-11T16:55:15Z")

</div>

You can also skip the SDK approach entirely, and just build your own using `system.net.httpClient()`. You can even wrap that up in your own mini-SDK (it doesn't look like the Ambient Weather REST API is very complex) to make it a bit easier to use. I went into the (very broad strokes) here:

> [@Ignition and (Docker) Portainer API. (HTTP queries)](http://forum.inductiveautomation.com/t/ignition-and-docker-portainer-api-http-queries/36725/2):
>
> Http bindings aren’t going to work well for this purpose - they’re not very good at authentication right now. I’d recommend [system.net.httpClient()](https://docs.inductiveautomation.com/display/DOC80/system.net.httpClient). You could wrap things in a class to make accessing the API a little friendlier: class PortainerClient(object): def \_\_init\_\_(self, baseUrl, username, password, \*\*kwargs): self.baseUrl = baseUrl self.client = system.net.httpClient(\*\*kwargs) response = self.client.post(baseUrl + "auth", data={"Username": username, "Password": password}) self…

---

_[View the full topic](https://forum.inductiveautomation.com/t/importing-python-library-the-wrong-way/40527)._
