> For the complete documentation index, see [llms.txt](https://adamcysec.gitbook.io/csapp/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://adamcysec.gitbook.io/csapp/fundamentals/getting-set-up.md).

# Getting set up

Steps to install CSAPP and start the web app

<details>

<summary>Step1: Clone the CSAPP repository</summary>

```
git clone https://github.com/adamcysec/CSAPP.git
```

</details>

<details>

<summary>Step 2: Install the dependencies</summary>

```python
pip install streamlit duckdb csapptools beautifulsoup4 requests argparse
```

</details>

<details>

<summary>Step 3: Download the full PyPI data set</summary>

<https://drive.google.com/file/d/176E-5gb97egmRe8W9K-bh2YqHPn1W0PE/view?usp=sharing>

* Due to the file size being about 160 MB, I have to host the file on Google Drive.
* Store the data set CSV file in the CSAPP directory.

</details>

<details>

<summary>Step 4: Update the data set</summary>

pypi\_data\_harvest.py requires an API key from [libraries.io](https://libraries.io/)

1. Create an account on [libraries.io](https://libraries.io/)
2. Create a hidden directory in your user's home folder called `.librariesio`
3. Saved libraries.io api key in a txt file called `api_key.txt`

{% code fullWidth="false" %}

```python
py pypi_data_harvest.py --update "pypi_info_db.csv"
```

{% endcode %}

* New PyPI packages are uploaded every day, therefore you will want to update the data set before use.

</details>

<details>

<summary>Step 5: Run the web app locally</summary>

```
streamlit run pypi_streamlit.py
```

if you have more than one version of python installed you may need to run streamlit like so:

```
python3 -m streamlit run pypi_streamlit.py
```

* You will want to run the app locally to use the full data set.

</details>
