import files inside packages - Project Structure
Question: I have some doubts in relation to packages structure in a python project when
I make the imports

These are some conventions

**`python-irodsclient_API = Project Name`**

I've defined python packages for each file, in this case are the following:

**`python-irodsclient_API/config/`**

**`python-irodsclient_API/connection/`**

_These packages are well define as a packages and not as a directories
really?_

![enter image description here](http://i.stack.imgur.com/Hb5oz.jpg)

I have the file **`python-irodsclient_API/config/config.py`** in which I've
defined some constants about of configuration for connect with my server:

![enter image description here](http://i.stack.imgur.com/uSbAG.jpg)

And I have the **`python-irodsclient_API/connection/connection.py`** file:

![enter image description here](http://i.stack.imgur.com/J6UaX.jpg)

In the last or previous image (highlighted in red) .. is this the right way of
import the files?

I feel the sensation of this way is not better. I know that the "imports"
should be relatives and not absolutes (for the path) and that is necessary use
"." instead "*" In my case I don't know if this can be applied in relation to
the I'm doing in the graphics.

I appreciate your help and orientation Best Regards


Answer: There is a good tutorial about this in the [Python module
docs](https://docs.python.org/2/tutorial/modules.html#packages), which
explains how to refer to packages under structured folders.

Basically, `from x import y`, where `y` is a submodule name, allows you to use
`y.z` instead of `x.y.z`.

