Here the goal is to push to MISP information gathered on Github. The script [add_github_user.py](https://github.com/MISP/PyMISP/blob/main/examples/add_github_user.py) will be used as an example.
An **import script**, it's different from a MISP module.
An import script is run from a terminal to push data into a MISP, but a MISP module runs into a MISP instance. For more information about MISP modules, see [here](https://misp.github.io/misp-modules/)
**Tips:** in early phase or for testing purpose, it's better to start with an import module to test the code and results. If it's conclusive you can code a MISP module.
### PyMISP install
PyMISP is a Python library to access MISP with REST API. Install the [PyMISP](https://github.com/MISP/PyMISP) library on your machine.
To do so, clone the [repository](https://github.com/MISP/PyMISP) and install the library:
~~~bash
git clone https://github.com/MISP/PyMISP
cd PyMISP
pip3 install .
~~~
### Fork
If you wish to contribute and push your code to the MISP community, you'll need to fork the PyMISP library.
### Meaningful naming
Where to put the files and what are their names?
The script will be in **[PyMISP/examples](https://github.com/MISP/PyMISP/tree/main/examples)** and has the name of the imported service. A short key word is a good practice to describe the script action:
~~~
PyMISP/examples/add_github_user.py
~~~
**tips:** before naming your script, consult the list of available scripts into the PyMISP/examples folder, in order to describe accurately what your import module does.
For all scripts , you need to have a single key file **keys.py**. The file is not to be committed and contains the credentials for connecting to the MISP instance: API key, URL, SSH validations.