# pypi\_package\_validator.py

## Description

pypi\_package\_validator.py enumerates the data set CSV and performs a HEAD request on each PyPI package to determine if the package was deleted. If the package no longer exists, then the record is removed from the data set. This also helps to reduce the file size of the data set. &#x20;

## Dependencies

pypi\_package\_validator.py requires the following dependencies:

* [argparse](https://pypi.org/project/argparse/)
  * `pip install argparse`

## Usage

Parameter **--file, -f**

* type : str
* path to data set CSV file

Parameter **--output, -o**

* type : str
* New data set CSV file name

Parameter **--tmpfile, -tmp**

* type : bool
* Use this flag if progress was stopped and you need to resume progress

#### Example 1

```python
pypi_package_validator.py -f "pypi_info_main_db.csv"
```

* validates the given data set CSV file

#### Example 2

```python
pypi_package_validator.py -f 'pypi_info_main_db.csv' -tmp
```

* validates the given data set CSV file
* uses the -tmp flag to resume progress from the last validated package


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://adamcysec.gitbook.io/csapp/overview/features/pypi_package_validator.py.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
