# Requests: HTTP for Humans

**URL:** <https://discourse.slicer.org/t/requests-http-for-humans/994>\
**Category:** Development\
**Created:** [September 1, 2017, 10:18pm UTC](https://discourse.slicer.org/t/requests-http-for-humans/994 "2017-09-01T22:18:32Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ebremer](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ebremer/32/607_2.png) [@ebremer](https://discourse.slicer.org/u/ebremer)\
**Post date:** [September 1, 2017, 10:18pm UTC](https://discourse.slicer.org/t/requests-http-for-humans/994/1 "2017-09-01T22:18:32Z")

</div>

Would it be possible to add:

[http://docs.python-requests.org/en/latest/](http://docs.python-requests.org/en/latest/)

to the Slicer distribution. It has an Apache 2.0 license and is a lot easier to use than urllib or urllib2

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [September 1, 2017, 10:29pm UTC](https://discourse.slicer.org/t/requests-http-for-humans/994/2 "2017-09-01T22:29:53Z")

</div>

I agree that it would be useful. This package is Python-only, but it depends on a couple of other packages.

@jcfr What is the recommended process now for adding more Python packages to the Slicer distribution?

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [September 1, 2017, 10:51pm UTC](https://discourse.slicer.org/t/requests-http-for-humans/994/3 "2017-09-01T22:51:44Z")

</div>

Note that you can install `requests` using `pip` as shown in this post: [Slicer-Python Packages Use and Install](https://discourse.slicer.org/t/slicer-python-packages-use-and-install/984/9?u=lassoan). The only limitation is that on Windows you need to start Slicer as an admin, which may not be very user friendly.

---

<div class="post-metadata">

**Author:** ![jcfr](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jcfr/32/17825_2.png) [@jcfr](https://discourse.slicer.org/u/jcfr)\
**Post date:** [September 1, 2017, 11:06pm UTC](https://discourse.slicer.org/t/requests-http-for-humans/994/4 "2017-09-01T23:06:43Z")

</div>

> [@lassoan](#):
>
> The only limitation is that on Windows you need to start Slicer as an admin

We may have a way around that. I will follow up with more details later.

---

<div class="post-metadata">

**Author:** ![ebremer](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ebremer/32/607_2.png) [@ebremer](https://discourse.slicer.org/u/ebremer)\
**Post date:** [September 14, 2017, 9:24pm UTC](https://discourse.slicer.org/t/requests-http-for-humans/994/5 "2017-09-14T21:24:20Z")

</div>

Would that work around allow an extension to load dynamically the python requests package like the above example?

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [September 15, 2017, 12:45am UTC](https://discourse.slicer.org/t/requests-http-for-humans/994/6 "2017-09-15T00:45:40Z")

</div>

Until @jcfr fixes the installation issue, you can add these packages to your extension. Simply copy the unzipped package into your module directory. See for example the ptvsd module in [https://github.com/SlicerRt/SlicerDebuggingTools/tree/master/PyDevRemoteDebug](https://github.com/SlicerRt/SlicerDebuggingTools/tree/master/PyDevRemoteDebug)
