+## Using osmclient as a library to interact with OSM
+
+Assuming that you have installed python-osmclient package, it's pretty simple to write some Python code to interact with OSM.
+
+### Simple Python code to get the list of NS packages
+
+```python
+from osmclient import client
+from osmclient.common.exceptions import ClientException
+hostname = "127.0.0.1"
+myclient = client.Client(host=hostname, sol005=True)
+resp = myclient.nsd.list()
+print yaml.safe_dump(resp, indent=4, default_flow_style=False)
+```
+
+### Simple Python code to get the list of VNF packages from a specific user and project
+
+The code will print for each package a pretty table, then the full details in yaml
+
+```python
+from osmclient import client
+from osmclient.common.exceptions import ClientException
+import yaml
+from prettytable import PrettyTable
+hostname = "127.0.0.1"
+user = admin
+password = admin
+project = admin
+kwargs = {}
+if user is not None:
+ kwargs['user']=user
+if password is not None:
+ kwargs['password']=password
+if project is not None:
+ kwargs['project']=project
+myclient = client.Client(host=hostname, sol005=True, **kwargs)
+resp = myclient.vnfd.list()
+print yaml.safe_dump(resp, indent=4, default_flow_style=False)
+```
+
+## Enable autocompletion
+
+You can enable autocompletion in OSM client by creating a file osm-complete.sh in the following way:
+
+```bash
+mkdir -p $HOME/.bash_completion.d
+_OSM_COMPLETE=source osm > $HOME/.bash_completion.d/osm-complete.sh
+```
+
+Then you can add the following to your $HOME/.bashrc file:
+
+```bash
+. .bash_completion.d/osm-complete.sh
+```