# Manually add sqlite3 library to Libraries/Shared to import

**URL:** <https://forums.plex.tv/t/manually-add-sqlite3-library-to-libraries-shared-to-import/183548>\
**Category:** Dev/API Corner\
**Tags:** plugin-dev\
**Created:** [March 9, 2017, 11:03am UTC](https://forums.plex.tv/t/manually-add-sqlite3-library-to-libraries-shared-to-import/183548 "2017-03-09T11:03:43Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![pimylifeup](https://avatars.discourse-cdn.com/v4/letter/p/df705f/32.png) [@pimylifeup](https://forums.plex.tv/u/pimylifeup)\
**Post date:** [March 9, 2017, 11:03am UTC](https://forums.plex.tv/t/manually-add-sqlite3-library-to-libraries-shared-to-import/183548/1 "2017-03-09T11:03:43Z")

</div>

The sqlite3 module has been sanboxed by plex, probably for good reason.

I would like to import either sqlite3 or pysqlite or mysql libraries to manipulate(dml) a db within my channel plugin.

So far I tried importing mysql but plex does not allow for the import of a sub module that is written in c.

Has anyone tried/used any solution to work with a sqlite3 db from within the pythin code.

Some history of what I’ve been trying: [https://forums.plex.tv/discussion/261844/execute-javascript-using-pyv8](https://forums.plex.tv/discussion/261844/execute-javascript-using-pyv8)

---

<div class="post-metadata">

**Author:** ![dane22](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/dane22/32/4389_2.png) [@dane22](https://forums.plex.tv/u/dane22)\
**Post date:** [March 9, 2017, 7:52pm UTC](https://forums.plex.tv/t/manually-add-sqlite3-library-to-libraries-shared-to-import/183548/2 "2017-03-09T19:52:18Z")

</div>

What do you need to manipulate in the database?

---

<div class="post-metadata">

**Author:** ![pimylifeup](https://avatars.discourse-cdn.com/v4/letter/p/df705f/32.png) [@pimylifeup](https://forums.plex.tv/u/pimylifeup)\
**Post date:** [March 10, 2017, 4:42am UTC](https://forums.plex.tv/t/manually-add-sqlite3-library-to-libraries-shared-to-import/183548/3 "2017-03-10T04:42:31Z")

</div>

> @dane22 said:  
> What do you need to manipulate in the database?

I’ve seen your replies in the past regarding this. That question is just bait for you to spew and make the plex devs happy.

I’m looking for a constructive answer. I don’t think you have one. Please stop shitting on my post.

I’m planning on bundling a .db in my channel plugin based on my channel design.

Please don;t give me “DICT” usage alternatives and your own thoughts. I have searched through the forum and have enough of them.

A soultion would be nice otherwise please move on man.

---

<div class="post-metadata">

**Author:** ![dane22](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/dane22/32/4389_2.png) [@dane22](https://forums.plex.tv/u/dane22)\
**Post date:** [March 10, 2017, 7:17am UTC](https://forums.plex.tv/t/manually-add-sqlite3-library-to-libraries-shared-to-import/183548/4 "2017-03-10T07:17:33Z")

</div>

Wow…Having a bad day here?

I was simply asking, cuz maybe there’s an alternative using the API

---

<div class="post-metadata">

**Author:** ![Twoure](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/twoure/32/91016_2.png) [@Twoure](https://forums.plex.tv/u/Twoure)\
**Post date:** [March 10, 2017, 5:49pm UTC](https://forums.plex.tv/t/manually-add-sqlite3-library-to-libraries-shared-to-import/183548/5 "2017-03-10T17:49:55Z")

</div>

> @pimylifeup said:  
> Has anyone tried/used any solution to work with a sqlite3 db from within the pythin code.

[Trakttv.bundle](https://github.com/trakt/Plex-Trakt-Scrobbler) is the only one I know of. However, they have built the binaries for each platform and use a custom importing system so their channel can interact with Plex’s database and to remedy any ssl cert issues that comes with Plex’s builtin Python.

I did find a post [here](http://stackoverflow.com/questions/6617753/potential-database-systems-for-portable-standalone-web-applications#answer-6618038) that gives a list of sql wrappers and some pure python based sql db. Maybe [PyDbLite](http://pydblite.readthedocs.io/en/latest/index.html) can handle your needs? Other than that, you’ll have to query the Trakt channel developer(s) about their channel and how they handle databases.

---

<div class="post-metadata">

**Author:** ![pimylifeup](https://avatars.discourse-cdn.com/v4/letter/p/df705f/32.png) [@pimylifeup](https://forums.plex.tv/u/pimylifeup)\
**Post date:** [March 11, 2017, 3:04am UTC](https://forums.plex.tv/t/manually-add-sqlite3-library-to-libraries-shared-to-import/183548/6 "2017-03-11T03:04:18Z")

</div>

> @Twoure said:
> 
> > @pimylifeup said:  
> > Has anyone tried/used any solution to work with a sqlite3 db from within the pythin code.
> 
> [Trakttv.bundle](https://github.com/trakt/Plex-Trakt-Scrobbler) is the only one I know of. However, they have built the binaries for each platform and use a custom importing system so their channel can interact with Plex’s database and to remedy any ssl cert issues that comes with Plex’s builtin Python.
> 
> I did find a post [here](http://stackoverflow.com/questions/6617753/potential-database-systems-for-portable-standalone-web-applications#answer-6618038) that gives a list of sql wrappers and some pure python based sql db. Maybe [PyDbLite](http://pydblite.readthedocs.io/en/latest/index.html) can handle your needs? Other than that, you’ll have to query the Trakt channel developer(s) about their channel and how they handle databases.

Thank you. Will give your suggested solutions a spin.  
Appreciate your time.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [January 8, 2020, 8:02pm UTC](https://forums.plex.tv/t/manually-add-sqlite3-library-to-libraries-shared-to-import/183548/7 "2020-01-08T20:02:54Z")

</div>


