peopledatalabs


Namepeopledatalabs JSON
Version 3.0.9 PyPI version JSON
download
home_pagehttps://www.peopledatalabs.com
SummaryOfficial Python client for the People Data Labs API
upload_time2024-03-18 18:19:19
maintainer
docs_urlNone
authorPeople Data Labs
requires_python>=3.8,<4.0
licenseMIT
keywords data enrichment people data labs person enrichment company enrichment search
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <p align="center">
<img src="https://i.imgur.com/S7DkZtr.png" width="250" alt="People Data Labs Logo">
</p>
<h1 align="center">People Data Labs Python Client</h1>
<p align="center">Official Python client for the People Data Labs API.</p>

<p align="center">
  <a href="https://github.com/peopledatalabs/peopledatalabs-python">
    <img src="https://img.shields.io/badge/repo%20status-Active-limegreen" alt="Repo Status">
  </a>&nbsp;
  <a href="https://pypi.org/project/peopledatalabs/">
    <img src="https://img.shields.io/pypi/v/peopledatalabs.svg?logo=pypi&logoColor=fff&label=PyPI+package&color=limegreen" alt="People Data Labs on PyPI" />
  </a>&nbsp;
  <a href="https://pypi.org/project/peopledatalabs/">
    <img src="https://img.shields.io/pypi/pyversions/peopledatalabs.svg" alt="People Data Labs on PyPI" />
  </a>&nbsp;
  <a href="https://github.com/peopledatalabs/peopledatalabs-python/actions/workflows/python-poetry.yml">
    <img src="https://github.com/peopledatalabs/peopledatalabs-python/actions/workflows/python-poetry.yml/badge.svg" alt="Tests Status" />
  </a>
</p>

## Table of Contents

- [🔧 Installation](#installation)
- [🚀 Usage](#usage)
- [🏝 Sandbox Usage](#sandbox)
- [🌐 Endpoints](#endpoints)
- [📘 Documentation](#documentation)
  - [Upgrading to v2.X.X](#upgrading-to-v2)
  - [Upgrading to v3.X.X](#upgrading-to-v3)


## 🔧 Installation <a name="installation"></a>

1. Install from PyPi using [pip](https://pip.pypa.io/en/latest/), a package manager for Python.

    ```bash
    pip install peopledatalabs
    ```

2. Sign up for a [free PDL API key](https://www.peopledatalabs.com/signup).
3. Set your API key in the `PDL_API_KEY` environment variable.

## 🚀 Usage <a name="usage"></a>

First, create the PDLPY client:

```python
from peopledatalabs import PDLPY


# specifying an API key
client = PDLPY(
    api_key="YOUR API KEY",
)

# or leave blank if you have PDL_API_KEY set in your environment or .env file
client = PDLPY()
```

**Note:** You can provide your API key directly in code, or alternatively set a `PDL_API_KEY` variable in your environment or `.env` file.

Then, send requests to any PDL API Endpoint.

### Getting Person Data

#### By Enrichment

```python
result = client.person.enrichment(
    phone="4155688415",
    pretty=True,
)
if result.ok:
    print(result.text)
else:
    print(
        f"Status: {result.status_code};"
        f"\nReason: {result.reason};"
        f"\nMessage: {result.json()['error']['message']};"
    )
```

#### By Bulk Enrichment

```python
result = client.person.bulk(
    required="emails AND profiles",
    requests=[
        {
            "metadata": {
                "user_id": "123"
            },
            "params": {
                "profile": ["linkedin.com/in/seanthorne"],
                "location": ["SF Bay Area"],
                "name": ["Sean F. Thorne"],
            }
        },
        {
            "metadata": {
                "user_id": "345"
            },
            "params": {
                "profile": ["https://www.linkedin.com/in/haydenconrad/"],
                "first_name": "Hayden",
                "last_name": "Conrad",
            }
        }
    ]
)
if result.ok:
    print(result.text)
else:
    print(
        f"Status: {result.status_code}"
        f"\nReason: {result.reason}"
        f"\nMessage: {result.json()['error']['message']}"
    )
```

#### By Search (Elasticsearch)

```python
es_query = {
    "query": {
        "bool": {
            "must": [
                {"term": {"location_country": "mexico"}},
                {"term": {"job_title_role": "health"}},
            ]
        }
    }
}
data = {
    "query": es_query,
    "size": 10,
    "pretty": True,
    "dataset": "phone, mobile_phone",
}
result = client.person.search(**data)
if result.ok:
    print(result.text)
else:
    print(
        f"Status: {result.status_code}"
        f"\nReason: {result.reason}"
        f"\nMessage: {result.json()['error']['message']}"
    )
```

#### By Search (SQL)

```python
sql_query = (
    "SELECT * FROM person"
    " WHERE location_country='mexico'"
    " AND job_title_role='health'"
    " AND phone_numbers IS NOT NULL;"
)
data = {
    "sql": sql_query,
    "size": 10,
    "pretty": True,
    "dataset": "phone, mobile_phone",
}
result = client.person.search(**data)
if result.ok:
    print(result.text)
else:
    print(
        f"Status: {result.status_code}"
        f"\nReason: {result.reason}"
        f"\nMessage: {result.json()['error']['message']}"
    )
```

#### By `PDL_ID` (Retrieve API)

```python
result = client.person.retrieve(
    person_id="qEnOZ5Oh0poWnQ1luFBfVw_0000",
)
if result.ok:
    print(result.text)
else:
    print(
        f"Status: {result.status_code}"
        f"\nReason: {result.reason}"
        f"\nMessage: {result.json()['error']['message']}"
    )
```

#### By Fuzzy Enrichment (Identify API)

```python
result = client.person.enrichment(
    name="sean thorne",
    pretty=True,
)
if result.ok:
    print(result.text)
else:
    print(
        f"Status: {result.status_code}"
        f"\nReason: {result.reason}"
        f"\nMessage: {result.json()['error']['message']}"
    )
```

### Getting Company Data

#### By Enrichment

```python
result = client.company.enrichment(
    website="peopledatalabs.com",
    pretty=True,
)
if result.ok:
    print(result.text)
else:
    print(
        f"Status: {result.status_code}"
        f"\nReason: {result.reason}"
        f"\nMessage: {result.json()['error']['message']}"
    )
```

#### By Bulk Enrichment

```python
result = client.company.bulk(
    requests=[
        {
            "metadata": {
                "company_id": "123"
            },
            "params": {
                "profile": "linkedin.com/company/peopledatalabs",
            }
        },
        {
            "metadata": {
                "company_id": "345"
            },
            "params": {
                "profile": "https://www.linkedin.com/company/apple/",
            }
        }
    ]
)
if result.ok:
    print(result.text)
else:
    print(
        f"Status: {result.status_code}"
        f"\nReason: {result.reason}"
        f"\nMessage: {result.json()['error']['message']}"
    )
```

#### By Search (Elasticsearch)

```python
es_query = {
    "query": {
        "bool": {
            "must": [
                {"term": {"tags": "big data"}},
                {"term": {"industry": "financial services"}},
                {"term": {"location.country": "united states"}},
            ]
        }
    }
}
data = {
    "query": es_query,
    "size": 10,
    "pretty": True,
}
result = client.company.search(**data)
if result.ok:
    print(result.text)
else:
    print(
        f"Status: {result.status_code}"
        f"\nReason: {result.reason}"
        f"\nMessage: {result.json()['error']['message']}"
    )
```

#### By Search (SQL)

```python
sql_query = (
    "SELECT * FROM company"
    " WHERE tags='big data'"
    " AND industry='financial services'"
    " AND location.country='united states';"
)
data = {
    "sql": sql_query,
    "size": 10,
    "pretty": True,
}
result = client.company.search(**data)
if result.ok:
    print(result.text)
else:
    print(
        f"Status: {result.status_code}"
        f"\nReason: {result.reason}"
        f"\nMessage: {result.json()['error']['message']}"
    )
```

### Using supporting APIs

#### Get Autocomplete Suggestions

```python
result = client.autocomplete(
    field="title",
    text="full",
    size=10,
)
if result.ok:
    print(result.text)
else:
    print(
        f"Status: {result.status_code}"
        f"\nReason: {result.reason}"
        f"\nMessage: {result.json()['error']['message']}"
    )
```

#### Clean Raw Company Strings

```python
result = client.company.cleaner(
    name="peOple DaTa LabS",
)
if result.ok:
    print(result.text)
else:
    print(
        f"Status: {result.status_code}"
        f"\nReason: {result.reason}"
        f"\nMessage: {result.json()['error']['message']}"
    )
```

#### Clean Raw Location Strings

```python
result = client.location.cleaner(
    location="455 Market Street, San Francisco, California 94105, US",
)
if result.ok:
    print(result.text)
else:
    print(
        f"Status: {result.status_code}"
        f"\nReason: {result.reason}"
        f"\nMessage: {result.json()['error']['message']}"
    )
```

#### Clean Raw School Strings

```python
result = client.school.cleaner(
    name="university of oregon",
)
if result.ok:
    print(result.text)
else:
    print(
        f"Status: {result.status_code}"
        f"\nReason: {result.reason}"
        f"\nMessage: {result.json()['error']['message']}"
    )
```

#### Get Job Title Enrichment

```python
result = client.job_title(
    job_title="data scientist",
)
if result.ok:
    print(result.text)
else:
    print(
        f"Status: {result.status_code}"
        f"\nReason: {result.reason}"
        f"\nMessage: {result.json()['error']['message']}"
    )
```

#### Get Skill Enrichment

```python
result = client.skill(
    skill="c++",
)
if result.ok:
    print(result.text)
else:
    print(
        f"Status: {result.status_code}"
        f"\nReason: {result.reason}"
        f"\nMessage: {result.json()['error']['message']}"
    )
```

#### Get IP Enrichment

```python
result = client.ip(
    ip="72.212.42.169",
)
if result.ok:
    print(result.text)
else:
    print(
        f"Status: {result.status_code};"
        f"\nReason: {result.reason};"
        f"\nMessage: {result.json()['error']['message']};"
    )
```

## 🏝 Sandbox Usage <a name="sandbox"></a>
#### To enable sandbox usage, use the sandbox flag on PDLPY

```python
PDLPY(sandbox=True)
```

## 🌐 Endpoints <a name="endpoints"></a>

**Person Endpoints**

| API Endpoint                                                                                    | PDLPY Function                      |
| ----------------------------------------------------------------------------------------------- | ----------------------------------- |
| [Person Enrichment API](https://docs.peopledatalabs.com/docs/enrichment-api)                    | `PDLPY.person.enrichment(**params)` |
| [Person Bulk Enrichment API](https://docs.peopledatalabs.com/docs/bulk-enrichment-api)          | `PDLPY.person.bulk(**params)`       |
| [Person Search API](https://docs.peopledatalabs.com/docs/search-api)                            | `PDLPY.person.search(**params)`     |
| [Person Retrieve API](https://docs.peopledatalabs.com/docs/person-retrieve-api)                 | `PDLPY.person.retrieve(**params)`   |
| [Person Identify API](https://docs.peopledatalabs.com/docs/identify-api)                        | `PDLPY.person.identify(**params)`   |

**Company Endpoints**

| API Endpoint                                                                                    | PDLPY Function                       |
| ----------------------------------------------------------------------------------------------- | ------------------------------------ |
| [Company Enrichment API](https://docs.peopledatalabs.com/docs/company-enrichment-api)           | `PDLPY.company.enrichment(**params)` |
| [Company Bulk Enrichment API](https://docs.peopledatalabs.com/docs/bulk-company-enrichment-api) | `PDLPY.company.bulk(**params)`       |
| [Company Search API](https://docs.peopledatalabs.com/docs/company-search-api)                   | `PDLPY.company.search(**params)`     |

**Supporting Endpoints**

| API Endpoint                                                                              | PDLJS Function                     |
| ----------------------------------------------------------------------------------------- | ---------------------------------- |
| [Autocomplete API](https://docs.peopledatalabs.com/docs/autocomplete-api)                 | `PDLPY.autocomplete(**params)`     |
| [Company Cleaner API](https://docs.peopledatalabs.com/docs/cleaner-apis#companyclean)     | `PDLPY.company.cleaner(**params)`  |
| [Location Cleaner API](https://docs.peopledatalabs.com/docs/cleaner-apis#locationclean)   | `PDLPY.location.cleaner(**params)` |
| [School Cleaner API](https://docs.peopledatalabs.com/docs/cleaner-apis#schoolclean)       | `PDLPY.school.cleaner(**params)`   |
| [Job Title Enrichment API](https://docs.peopledatalabs.com/docs/job-title-enrichment-api) | `PDLPY.job_title(**params)`        |
| [Skill Enrichment API](https://docs.peopledatalabs.com/docs/skill-enrichment-api)         | `PDLPY.skill(**params)`            |
| [IP Enrichment API](https://docs.peopledatalabs.com/docs/ip-enrichment-api)               | `PDLPY.ip(**params)`               |

## 📘 Documentation <a name="documentation"></a>

All of our API endpoints are documented at: https://docs.peopledatalabs.com/

These docs describe the supported input parameters, output responses and also provide additional technical context.

As illustrated in the [Endpoints](#endpoints) section above, each of our API endpoints is mapped to a specific method in the PDLPY class.  For each of these class methods, **all function inputs are mapped as input parameters to the respective API endpoint**, meaning that you can use the API documentation linked above to determine the input parameters for each endpoint.

As an example:

The following is **valid** because `name` is a [supported input parameter to the Person Identify API](https://docs.peopledatalabs.com/docs/identify-api-reference#input-parameters):

```python
PDLPY().person.identify({"name": "sean thorne"})
```

Conversely, this would be **invalid** because `fake_parameter` is not an input parameter to the Person Identify API:

```python
PDLPY().person.identify({"fake_parameter": "anything"})
```

### Upgrading to v2.X.X <a name="upgrading-to-v2"></a>

NOTE: When upgrading to v2.X.X from vX.X.X and below, the minimum required python version is now 3.8.

### Upgrading to v3.X.X <a name="upgrading-to-v3"></a>

NOTE: When upgrading to v3.X.X from vX.X.X and below, the minimum required pydantic version is now 2.

            

Raw data

            {
    "_id": null,
    "home_page": "https://www.peopledatalabs.com",
    "name": "peopledatalabs",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8,<4.0",
    "maintainer_email": "",
    "keywords": "data enrichment,people data labs,person enrichment,company enrichment,search",
    "author": "People Data Labs",
    "author_email": "hello@peopledatalabs.com",
    "download_url": "https://files.pythonhosted.org/packages/d4/d5/65a817d79185d8a8fd4d7e328060c14c1ddd61a424865829a56f2eb8c8d1/peopledatalabs-3.0.9.tar.gz",
    "platform": null,
    "description": "<p align=\"center\">\n<img src=\"https://i.imgur.com/S7DkZtr.png\" width=\"250\" alt=\"People Data Labs Logo\">\n</p>\n<h1 align=\"center\">People Data Labs Python Client</h1>\n<p align=\"center\">Official Python client for the People Data Labs API.</p>\n\n<p align=\"center\">\n  <a href=\"https://github.com/peopledatalabs/peopledatalabs-python\">\n    <img src=\"https://img.shields.io/badge/repo%20status-Active-limegreen\" alt=\"Repo Status\">\n  </a>&nbsp;\n  <a href=\"https://pypi.org/project/peopledatalabs/\">\n    <img src=\"https://img.shields.io/pypi/v/peopledatalabs.svg?logo=pypi&logoColor=fff&label=PyPI+package&color=limegreen\" alt=\"People Data Labs on PyPI\" />\n  </a>&nbsp;\n  <a href=\"https://pypi.org/project/peopledatalabs/\">\n    <img src=\"https://img.shields.io/pypi/pyversions/peopledatalabs.svg\" alt=\"People Data Labs on PyPI\" />\n  </a>&nbsp;\n  <a href=\"https://github.com/peopledatalabs/peopledatalabs-python/actions/workflows/python-poetry.yml\">\n    <img src=\"https://github.com/peopledatalabs/peopledatalabs-python/actions/workflows/python-poetry.yml/badge.svg\" alt=\"Tests Status\" />\n  </a>\n</p>\n\n## Table of Contents\n\n- [\ud83d\udd27 Installation](#installation)\n- [\ud83d\ude80 Usage](#usage)\n- [\ud83c\udfdd Sandbox Usage](#sandbox)\n- [\ud83c\udf10 Endpoints](#endpoints)\n- [\ud83d\udcd8 Documentation](#documentation)\n  - [Upgrading to v2.X.X](#upgrading-to-v2)\n  - [Upgrading to v3.X.X](#upgrading-to-v3)\n\n\n## \ud83d\udd27 Installation <a name=\"installation\"></a>\n\n1. Install from PyPi using [pip](https://pip.pypa.io/en/latest/), a package manager for Python.\n\n    ```bash\n    pip install peopledatalabs\n    ```\n\n2. Sign up for a [free PDL API key](https://www.peopledatalabs.com/signup).\n3. Set your API key in the `PDL_API_KEY` environment variable.\n\n## \ud83d\ude80 Usage <a name=\"usage\"></a>\n\nFirst, create the PDLPY client:\n\n```python\nfrom peopledatalabs import PDLPY\n\n\n# specifying an API key\nclient = PDLPY(\n    api_key=\"YOUR API KEY\",\n)\n\n# or leave blank if you have PDL_API_KEY set in your environment or .env file\nclient = PDLPY()\n```\n\n**Note:** You can provide your API key directly in code, or alternatively set a `PDL_API_KEY` variable in your environment or `.env` file.\n\nThen, send requests to any PDL API Endpoint.\n\n### Getting Person Data\n\n#### By Enrichment\n\n```python\nresult = client.person.enrichment(\n    phone=\"4155688415\",\n    pretty=True,\n)\nif result.ok:\n    print(result.text)\nelse:\n    print(\n        f\"Status: {result.status_code};\"\n        f\"\\nReason: {result.reason};\"\n        f\"\\nMessage: {result.json()['error']['message']};\"\n    )\n```\n\n#### By Bulk Enrichment\n\n```python\nresult = client.person.bulk(\n    required=\"emails AND profiles\",\n    requests=[\n        {\n            \"metadata\": {\n                \"user_id\": \"123\"\n            },\n            \"params\": {\n                \"profile\": [\"linkedin.com/in/seanthorne\"],\n                \"location\": [\"SF Bay Area\"],\n                \"name\": [\"Sean F. Thorne\"],\n            }\n        },\n        {\n            \"metadata\": {\n                \"user_id\": \"345\"\n            },\n            \"params\": {\n                \"profile\": [\"https://www.linkedin.com/in/haydenconrad/\"],\n                \"first_name\": \"Hayden\",\n                \"last_name\": \"Conrad\",\n            }\n        }\n    ]\n)\nif result.ok:\n    print(result.text)\nelse:\n    print(\n        f\"Status: {result.status_code}\"\n        f\"\\nReason: {result.reason}\"\n        f\"\\nMessage: {result.json()['error']['message']}\"\n    )\n```\n\n#### By Search (Elasticsearch)\n\n```python\nes_query = {\n    \"query\": {\n        \"bool\": {\n            \"must\": [\n                {\"term\": {\"location_country\": \"mexico\"}},\n                {\"term\": {\"job_title_role\": \"health\"}},\n            ]\n        }\n    }\n}\ndata = {\n    \"query\": es_query,\n    \"size\": 10,\n    \"pretty\": True,\n    \"dataset\": \"phone, mobile_phone\",\n}\nresult = client.person.search(**data)\nif result.ok:\n    print(result.text)\nelse:\n    print(\n        f\"Status: {result.status_code}\"\n        f\"\\nReason: {result.reason}\"\n        f\"\\nMessage: {result.json()['error']['message']}\"\n    )\n```\n\n#### By Search (SQL)\n\n```python\nsql_query = (\n    \"SELECT * FROM person\"\n    \" WHERE location_country='mexico'\"\n    \" AND job_title_role='health'\"\n    \" AND phone_numbers IS NOT NULL;\"\n)\ndata = {\n    \"sql\": sql_query,\n    \"size\": 10,\n    \"pretty\": True,\n    \"dataset\": \"phone, mobile_phone\",\n}\nresult = client.person.search(**data)\nif result.ok:\n    print(result.text)\nelse:\n    print(\n        f\"Status: {result.status_code}\"\n        f\"\\nReason: {result.reason}\"\n        f\"\\nMessage: {result.json()['error']['message']}\"\n    )\n```\n\n#### By `PDL_ID` (Retrieve API)\n\n```python\nresult = client.person.retrieve(\n    person_id=\"qEnOZ5Oh0poWnQ1luFBfVw_0000\",\n)\nif result.ok:\n    print(result.text)\nelse:\n    print(\n        f\"Status: {result.status_code}\"\n        f\"\\nReason: {result.reason}\"\n        f\"\\nMessage: {result.json()['error']['message']}\"\n    )\n```\n\n#### By Fuzzy Enrichment (Identify API)\n\n```python\nresult = client.person.enrichment(\n    name=\"sean thorne\",\n    pretty=True,\n)\nif result.ok:\n    print(result.text)\nelse:\n    print(\n        f\"Status: {result.status_code}\"\n        f\"\\nReason: {result.reason}\"\n        f\"\\nMessage: {result.json()['error']['message']}\"\n    )\n```\n\n### Getting Company Data\n\n#### By Enrichment\n\n```python\nresult = client.company.enrichment(\n    website=\"peopledatalabs.com\",\n    pretty=True,\n)\nif result.ok:\n    print(result.text)\nelse:\n    print(\n        f\"Status: {result.status_code}\"\n        f\"\\nReason: {result.reason}\"\n        f\"\\nMessage: {result.json()['error']['message']}\"\n    )\n```\n\n#### By Bulk Enrichment\n\n```python\nresult = client.company.bulk(\n    requests=[\n        {\n            \"metadata\": {\n                \"company_id\": \"123\"\n            },\n            \"params\": {\n                \"profile\": \"linkedin.com/company/peopledatalabs\",\n            }\n        },\n        {\n            \"metadata\": {\n                \"company_id\": \"345\"\n            },\n            \"params\": {\n                \"profile\": \"https://www.linkedin.com/company/apple/\",\n            }\n        }\n    ]\n)\nif result.ok:\n    print(result.text)\nelse:\n    print(\n        f\"Status: {result.status_code}\"\n        f\"\\nReason: {result.reason}\"\n        f\"\\nMessage: {result.json()['error']['message']}\"\n    )\n```\n\n#### By Search (Elasticsearch)\n\n```python\nes_query = {\n    \"query\": {\n        \"bool\": {\n            \"must\": [\n                {\"term\": {\"tags\": \"big data\"}},\n                {\"term\": {\"industry\": \"financial services\"}},\n                {\"term\": {\"location.country\": \"united states\"}},\n            ]\n        }\n    }\n}\ndata = {\n    \"query\": es_query,\n    \"size\": 10,\n    \"pretty\": True,\n}\nresult = client.company.search(**data)\nif result.ok:\n    print(result.text)\nelse:\n    print(\n        f\"Status: {result.status_code}\"\n        f\"\\nReason: {result.reason}\"\n        f\"\\nMessage: {result.json()['error']['message']}\"\n    )\n```\n\n#### By Search (SQL)\n\n```python\nsql_query = (\n    \"SELECT * FROM company\"\n    \" WHERE tags='big data'\"\n    \" AND industry='financial services'\"\n    \" AND location.country='united states';\"\n)\ndata = {\n    \"sql\": sql_query,\n    \"size\": 10,\n    \"pretty\": True,\n}\nresult = client.company.search(**data)\nif result.ok:\n    print(result.text)\nelse:\n    print(\n        f\"Status: {result.status_code}\"\n        f\"\\nReason: {result.reason}\"\n        f\"\\nMessage: {result.json()['error']['message']}\"\n    )\n```\n\n### Using supporting APIs\n\n#### Get Autocomplete Suggestions\n\n```python\nresult = client.autocomplete(\n    field=\"title\",\n    text=\"full\",\n    size=10,\n)\nif result.ok:\n    print(result.text)\nelse:\n    print(\n        f\"Status: {result.status_code}\"\n        f\"\\nReason: {result.reason}\"\n        f\"\\nMessage: {result.json()['error']['message']}\"\n    )\n```\n\n#### Clean Raw Company Strings\n\n```python\nresult = client.company.cleaner(\n    name=\"peOple DaTa LabS\",\n)\nif result.ok:\n    print(result.text)\nelse:\n    print(\n        f\"Status: {result.status_code}\"\n        f\"\\nReason: {result.reason}\"\n        f\"\\nMessage: {result.json()['error']['message']}\"\n    )\n```\n\n#### Clean Raw Location Strings\n\n```python\nresult = client.location.cleaner(\n    location=\"455 Market Street, San Francisco, California 94105, US\",\n)\nif result.ok:\n    print(result.text)\nelse:\n    print(\n        f\"Status: {result.status_code}\"\n        f\"\\nReason: {result.reason}\"\n        f\"\\nMessage: {result.json()['error']['message']}\"\n    )\n```\n\n#### Clean Raw School Strings\n\n```python\nresult = client.school.cleaner(\n    name=\"university of oregon\",\n)\nif result.ok:\n    print(result.text)\nelse:\n    print(\n        f\"Status: {result.status_code}\"\n        f\"\\nReason: {result.reason}\"\n        f\"\\nMessage: {result.json()['error']['message']}\"\n    )\n```\n\n#### Get Job Title Enrichment\n\n```python\nresult = client.job_title(\n    job_title=\"data scientist\",\n)\nif result.ok:\n    print(result.text)\nelse:\n    print(\n        f\"Status: {result.status_code}\"\n        f\"\\nReason: {result.reason}\"\n        f\"\\nMessage: {result.json()['error']['message']}\"\n    )\n```\n\n#### Get Skill Enrichment\n\n```python\nresult = client.skill(\n    skill=\"c++\",\n)\nif result.ok:\n    print(result.text)\nelse:\n    print(\n        f\"Status: {result.status_code}\"\n        f\"\\nReason: {result.reason}\"\n        f\"\\nMessage: {result.json()['error']['message']}\"\n    )\n```\n\n#### Get IP Enrichment\n\n```python\nresult = client.ip(\n    ip=\"72.212.42.169\",\n)\nif result.ok:\n    print(result.text)\nelse:\n    print(\n        f\"Status: {result.status_code};\"\n        f\"\\nReason: {result.reason};\"\n        f\"\\nMessage: {result.json()['error']['message']};\"\n    )\n```\n\n## \ud83c\udfdd Sandbox Usage <a name=\"sandbox\"></a>\n#### To enable sandbox usage, use the sandbox flag on PDLPY\n\n```python\nPDLPY(sandbox=True)\n```\n\n## \ud83c\udf10 Endpoints <a name=\"endpoints\"></a>\n\n**Person Endpoints**\n\n| API Endpoint                                                                                    | PDLPY Function                      |\n| ----------------------------------------------------------------------------------------------- | ----------------------------------- |\n| [Person Enrichment API](https://docs.peopledatalabs.com/docs/enrichment-api)                    | `PDLPY.person.enrichment(**params)` |\n| [Person Bulk Enrichment API](https://docs.peopledatalabs.com/docs/bulk-enrichment-api)          | `PDLPY.person.bulk(**params)`       |\n| [Person Search API](https://docs.peopledatalabs.com/docs/search-api)                            | `PDLPY.person.search(**params)`     |\n| [Person Retrieve API](https://docs.peopledatalabs.com/docs/person-retrieve-api)                 | `PDLPY.person.retrieve(**params)`   |\n| [Person Identify API](https://docs.peopledatalabs.com/docs/identify-api)                        | `PDLPY.person.identify(**params)`   |\n\n**Company Endpoints**\n\n| API Endpoint                                                                                    | PDLPY Function                       |\n| ----------------------------------------------------------------------------------------------- | ------------------------------------ |\n| [Company Enrichment API](https://docs.peopledatalabs.com/docs/company-enrichment-api)           | `PDLPY.company.enrichment(**params)` |\n| [Company Bulk Enrichment API](https://docs.peopledatalabs.com/docs/bulk-company-enrichment-api) | `PDLPY.company.bulk(**params)`       |\n| [Company Search API](https://docs.peopledatalabs.com/docs/company-search-api)                   | `PDLPY.company.search(**params)`     |\n\n**Supporting Endpoints**\n\n| API Endpoint                                                                              | PDLJS Function                     |\n| ----------------------------------------------------------------------------------------- | ---------------------------------- |\n| [Autocomplete API](https://docs.peopledatalabs.com/docs/autocomplete-api)                 | `PDLPY.autocomplete(**params)`     |\n| [Company Cleaner API](https://docs.peopledatalabs.com/docs/cleaner-apis#companyclean)     | `PDLPY.company.cleaner(**params)`  |\n| [Location Cleaner API](https://docs.peopledatalabs.com/docs/cleaner-apis#locationclean)   | `PDLPY.location.cleaner(**params)` |\n| [School Cleaner API](https://docs.peopledatalabs.com/docs/cleaner-apis#schoolclean)       | `PDLPY.school.cleaner(**params)`   |\n| [Job Title Enrichment API](https://docs.peopledatalabs.com/docs/job-title-enrichment-api) | `PDLPY.job_title(**params)`        |\n| [Skill Enrichment API](https://docs.peopledatalabs.com/docs/skill-enrichment-api)         | `PDLPY.skill(**params)`            |\n| [IP Enrichment API](https://docs.peopledatalabs.com/docs/ip-enrichment-api)               | `PDLPY.ip(**params)`               |\n\n## \ud83d\udcd8 Documentation <a name=\"documentation\"></a>\n\nAll of our API endpoints are documented at: https://docs.peopledatalabs.com/\n\nThese docs describe the supported input parameters, output responses and also provide additional technical context.\n\nAs illustrated in the [Endpoints](#endpoints) section above, each of our API endpoints is mapped to a specific method in the PDLPY class.  For each of these class methods, **all function inputs are mapped as input parameters to the respective API endpoint**, meaning that you can use the API documentation linked above to determine the input parameters for each endpoint.\n\nAs an example:\n\nThe following is **valid** because `name` is a [supported input parameter to the Person Identify API](https://docs.peopledatalabs.com/docs/identify-api-reference#input-parameters):\n\n```python\nPDLPY().person.identify({\"name\": \"sean thorne\"})\n```\n\nConversely, this would be **invalid** because `fake_parameter` is not an input parameter to the Person Identify API:\n\n```python\nPDLPY().person.identify({\"fake_parameter\": \"anything\"})\n```\n\n### Upgrading to v2.X.X <a name=\"upgrading-to-v2\"></a>\n\nNOTE: When upgrading to v2.X.X from vX.X.X and below, the minimum required python version is now 3.8.\n\n### Upgrading to v3.X.X <a name=\"upgrading-to-v3\"></a>\n\nNOTE: When upgrading to v3.X.X from vX.X.X and below, the minimum required pydantic version is now 2.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Official Python client for the People Data Labs API",
    "version": "3.0.9",
    "project_urls": {
        "Bug Tracker": "https://github.com/peopledatalabs/peopledatalabs-python/issues",
        "Documentation": "https://docs.peopledatalabs.com",
        "Homepage": "https://www.peopledatalabs.com",
        "Repository": "https://github.com/peopledatalabs/peopledatalabs-python",
        "Source Code": "https://github.com/peopledatalabs/peopledatalabs-python"
    },
    "split_keywords": [
        "data enrichment",
        "people data labs",
        "person enrichment",
        "company enrichment",
        "search"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3cbef7db186aa1a37eb82f55e33574df47b89b5ec867d33a0faaa996208a4c7d",
                "md5": "bda19866d90efc9e4a01857fdfa8966f",
                "sha256": "4e26d2b04f9609d04eb4e09005b94e830d1e7271e3608f5fafcbdb73b8951e1c"
            },
            "downloads": -1,
            "filename": "peopledatalabs-3.0.9-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "bda19866d90efc9e4a01857fdfa8966f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8,<4.0",
            "size": 18160,
            "upload_time": "2024-03-18T18:19:17",
            "upload_time_iso_8601": "2024-03-18T18:19:17.410421Z",
            "url": "https://files.pythonhosted.org/packages/3c/be/f7db186aa1a37eb82f55e33574df47b89b5ec867d33a0faaa996208a4c7d/peopledatalabs-3.0.9-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d4d565a817d79185d8a8fd4d7e328060c14c1ddd61a424865829a56f2eb8c8d1",
                "md5": "f8719adaab7077d7c441eabcac06fa12",
                "sha256": "2e7388ce8ad0ec0ad2eaf656f772d30ba9fae1fb1f9e1ac61016f78294592b37"
            },
            "downloads": -1,
            "filename": "peopledatalabs-3.0.9.tar.gz",
            "has_sig": false,
            "md5_digest": "f8719adaab7077d7c441eabcac06fa12",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8,<4.0",
            "size": 14409,
            "upload_time": "2024-03-18T18:19:19",
            "upload_time_iso_8601": "2024-03-18T18:19:19.630122Z",
            "url": "https://files.pythonhosted.org/packages/d4/d5/65a817d79185d8a8fd4d7e328060c14c1ddd61a424865829a56f2eb8c8d1/peopledatalabs-3.0.9.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-18 18:19:19",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "peopledatalabs",
    "github_project": "peopledatalabs-python",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "peopledatalabs"
}
        
Elapsed time: 0.22408s