The following scripts demonstrate how to connect to the [Nanospace Back-end](https://gitlab.isae-supaero.fr/nanostar/nanospace/nanospace-back-end/) and how to interact with it to create, read, update or delete components and values, in the Neo4J database.
### Requirement
Request package is needed
## 1. Requirements
A [Nanospace Back-end](https://gitlab.isae-supaero.fr/nanostar/nanospace/nanospace-back-end/) is required,
### 2.2. Authentication Test to Nanospace-Backend (Terminal)
It is possible to request your token using the following command line :
> Note: Replace the url, `<yourLogin>` and `<yourPassword>` by your real url, login and password) :
```bash
curl -s-i\
http://localhost:8888/login \
-H'Cache-Control: no-cache'\
-H'Content-Type: application/json'\
-d'{
"username":"<yourLogin>",
"password":"<yourPassword>"
}' | grep-i"Authorization:"
Response :
```bash
Authorization: Bearer --TokenId-- # Token Result
```
The result is giving you a token to access to your account.
### Simple examle
Check the `simple_example.py` python file.
### 2.2 Simple Example (simple_example.py)
Before try to launch it, change the `username`, `password` and `server` address (End the server address with a '/').
Check the `simple_example.py` Python file. Before try to launch it, change the `username`, `password` and `server` address (End the server address with a `/`).