To upload records on the OSSR, you may use the [Zenodo client](https://gitlab.in2p3.fr/escape2020/wp3/eossr/-/blob/master/eossr/api/zenodo.py).
The client is also used by the continuous integration to automatise project's uploads from GitLab to Zenodo [check the EOSSR scripts here](https://gitlab.in2p3.fr/escape2020/wp3/eossr/-/tree/master/eossr/scripts).
**However**, to upload records to the OSSR, you **will need** to use your Zenodo token ([create one](https://zenodo.org/account/settings/applications/tokens/new/)).
%% Cell type:code id:52aedbb2 tags:
``` python
token=''
token=$SANDBOX_ZENODO_TOKEN_GARCIA
```
%% Cell type:code id:6fcd7ef2 tags:
``` python
importjson
fromeossr.api.zenodoimportZenodoAPI
# Please note that for this demo we are using Zenodo Sandbox.
z=ZenodoAPI(access_token=token,sandbox=True)
```
%% Cell type:code id:24eecce0 tags:
``` python
```
%%Celltype:markdownid:c13a5232tags:
## Create a new entry
Firstwewouldneedtocreateanewentry
%%Celltype:codeid:83075f0btags:
``` python
new_entry = z.create_new_entry()
```
%% Cell type:code id:84173c5d tags:
``` python
```
%% Cell type:markdown id:fcd8e90c tags:
### Zenodo API answer handler
We have also developped a REST API response client to manage the answers from the Zenodo API.
%% Cell type:code id:22f8e2b2 tags:
``` python
from eossr.api.zenodo.http_status import ZenodoHTTPStatus