# Pystardog with certs and without certs failing

**URL:** <https://community.stardog.com/t/pystardog-with-certs-and-without-certs-failing/3842>\
**Category:** Bug\
**Created:** [July 5, 2022, 7:27pm UTC](https://community.stardog.com/t/pystardog-with-certs-and-without-certs-failing/3842 "2022-07-05T19:27:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![R3000](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/r3000/32/358_2.png) [@R3000](https://community.stardog.com/u/R3000)\
**Post date:** [July 5, 2022, 7:27pm UTC](https://community.stardog.com/t/pystardog-with-certs-and-without-certs-failing/3842/1 "2022-07-05T19:27:34Z")

</div>

@stephen - re-raising this very painful subject [Pystardog - how to specify verify=False](https://community.stardog.com/t/pystardog-how-to-specify-verify-false/3347)

I have also tried with certs but things are confusing - browser redirects stardog endpoint url to [https://auth.stardog.com/](https://auth.stardog.com/) - why is that?

Please realize not everyone develops from personal laptops. Can we keep things simple like they used to be?

---

<div class="post-metadata">

**Author:** ![stephen](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/stephen/32/27_2.png) [@stephen](https://community.stardog.com/u/stephen)\
**Post date:** [July 5, 2022, 7:32pm UTC](https://community.stardog.com/t/pystardog-with-certs-and-without-certs-failing/3842/2 "2022-07-05T19:32:58Z")

</div>

Hi Radu,

It turns out there is actually a way to pass that option in, however I do need to specify that even the documentation for `requests` says that it shouldn't really be used outside of the most trivial of setups.

That said, you can pass a `requests.Session` into your pystardog connection details:

```python
import requests

s = requests.Session()
s.verify = False

conn_details = {
  endpoint = 'http://myserver:5820',
  username = 'admin',
  password = 'secret',
  session = s
}

with stardog.Connection('db', **conn_details) as conn:
  ...

```

---

<div class="post-metadata">

**Author:** ![R3000](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/r3000/32/358_2.png) [@R3000](https://community.stardog.com/u/R3000)\
**Post date:** [July 5, 2022, 8:11pm UTC](https://community.stardog.com/t/pystardog-with-certs-and-without-certs-failing/3842/3 "2022-07-05T20:11:51Z")

</div>

Stephen,

Great to hear that - it worked - pystardog is useful now 🙂

Now let's raise the bar a bit. Let's say I have a valid certificate and would like to use it. How would I use it?

This package helps solve such challenges [certifi · PyPI](https://pypi.org/project/certifi/) But how do I use it along with pystardog.

Regards,  
Radu
