# How to use the site-packages folder to share Python modules/packages between sketches

**URL:** <https://discourse.processing.org/t/how-to-use-the-site-packages-folder-to-share-python-modules-packages-between-sketches/23452>\
**Category:** Processing.py\
**Created:** [August 23, 2020, 10:12pm UTC](https://discourse.processing.org/t/how-to-use-the-site-packages-folder-to-share-python-modules-packages-between-sketches/23452 "2020-08-23T22:12:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![villares](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/villares/32/3166_2.png) [@villares](https://discourse.processing.org/u/villares)\
**Post date:** [August 23, 2020, 10:12pm UTC](https://discourse.processing.org/t/how-to-use-the-site-packages-folder-to-share-python-modules-packages-between-sketches/23452/1 "2020-08-23T22:12:54Z")

</div>

I have heard of this many times but @berin was the one friend who made me try it at last.

Inside your`sketchbook/libraries` folder (`Processing/libraries` on Mac and Windows) you can have a `site-packages` folder containing “Python packages” with modules (.py files) that can be imported by any of your sketches (without having to add them as tabs).

```auto
libraries/site-packages/my_lib   
                         |_ __init__.py (can be an empty file) 
                         |_ a_module.py (name them as you wish...)
                         |_ b_module.py

```

Then you can use inside your sketch:

```python
from my_lib import a_module, b_module
# or any other normal Python import-happy ways of importing stuff 
from my_lib.a_module import *   
from my_lib import a_module as amod
from my_lib.b_module import my_great_function, MyClass   

```

I hope I have described this correctly and that it may be useful to other people.
