truecallerpy


Nametruecallerpy JSON
Version 1.0.3 PyPI version JSON
download
home_page
SummaryTruecallerPy is a Python package that provides functionalities to interact with the Truecaller API. It allows you to perform login, OTP verification, and phone number search using Truecaller.
upload_time2023-08-17 20:08:45
maintainer
docs_urlNone
author
requires_python
licenseMIT License Copyright (c) 2022 Emmadi Sumith Kumar Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords truecallerpy truecaller search phone number phonenumber information mobile
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # [Truecallerpy](https://github.com/sumithemmadi/truecallerpy)

[![PyPI - Implementation](https://img.shields.io/pypi/v/truecallerpy?style=flat-square)](https://pypi.org/project/truecallerpy)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/truecallerpy?style=flat-square)](https://pypi.org/project/truecallerpy)
[![Downloads](https://static.pepy.tech/badge/truecallerpy)](https://pepy.tech/project/truecallerpy)
[![PyPI - License](https://img.shields.io/pypi/l/truecallerpy?style=flat-square)](https://github.com/sumithemmadi/truecallerpy/edit/main/LICENSE.md)

TruecallerPy is a Python package that provides functionalities to interact with the Truecaller API. It allows you to perform login, OTP verification, and phone number search using Truecaller.

**Table of Contents:**

- [Truecallerpy](#truecallerpy)
  - [Requirements](#requirements)
  - [Command Line Usage](#command-line-usage)
    - [Installation](#installation)
    - [Login](#login)
    - [InstallationId](#installationid)
    - [Searching a Number](#searching-a-number)
    - [Bulk Phone Number Search with cli](#bulk-phone-number-search-with-cli)
  - [Basic Usage](#basic-usage)
    - [Login Function](#login-function)
    - [OTP Verification](#otp-verification)
    - [Phone Number Search](#phone-number-search)
    - [Bulk Phone Number Search](#bulk-phone-number-search)
  - [Contributing](#contributing)
  - [License](#license)
  - [Support](#support)

## Requirements

To use the TruecallerPy package, you need to meet the following requirements:

- Valid Mobile Number (Phone number verification for Truecaller)
- Truecaller InstallationId

## Command Line Usage

### Installation

You can install the TruecallerPy package using pip:

```bash
pip install truecallerpy
```

### Login

To log in to your Truecaller account, use the following command:

```bash
truecallerpy login
```

If you encounter any errors, try running the command with administrative privilege (e.g., `sudo truecallerpy login` on Linux or running the command prompt as administrator on Windows).

### InstallationId

To retrieve your Truecaller InstallationId, use the following command:

```bash
truecallerpy --installationid
```

You can also specify the `-i` flag to print only the InstallationId:

```bash
truecallerpy -i -r
```

### Searching a Number

To search for a phone number using Truecaller, use the following command:

```bash
truecallerpy -s [number]
```

For example:

```bash
truecallerpy -s 1234567890
```

The command will return a JSON response containing information about the phone number.

You can use the `-r` flag to get the raw output (JSON) instead of the formatted output. For example:

```bash
truecallerpy -s 1234567890 -r
```

You can also use additional flags to extract specific information. For example, to print only the name associated with the phone number, use the `--name` flag:

```bash
truecallerpy -s 1234567890 --name
```

Similarly, you can use the `--email` flag to print only the email associated with the phone number.

### Bulk Phone Number Search with cli

To perform a bulk search for multiple phone numbers, use the `--bs` flag followed by the numbers separated by commas. For example:

```bash
truecallerpy --bs 9912345678,+14051234567,+919987654321
```

In addition to the CLI, you can also use the TruecallerPy package in your Python code. The package provides various functions such as `login`, `verify_otp`, `search_phonenumber`, and `bulk_search`.

## Basic Usage

### Login Function

The `login` function is used to log in to the Truecaller service. It takes a phone number in international format as a parameter and returns a dictionary containing the login response details.

```python
import asyncio
from truecallerpy import login

phone_number = "+1234567890"
response = asyncio.run(login(phone_number))
print(response)
```

The `login` function returns a dictionary with the following keys:

- `status_code` (int): The status code of the  request.
- `status` (int): The status code of the truecaller login request.
- `message` (str): A message indicating the status of the login request.
- `domain` (str): The domain associated with the phone number.
- `parsedPhoneNumber` (int): The phone number without the country code.
- `parsedCountryCode` (str): The country code associated with the phone number.
- `requestId` (str): The unique identifier for the login request.
- `method` (str): The method used for sending the OTP.
- `tokenTtl` (int): The time-to-live (TTL) value for the OTP token in seconds.

### OTP Verification

The `verify_otp` function is used to verify the mobile number with the OTP (One-Time Password) received.

```python
import asyncio
from truecallerpy import verify_otp

phone_number = "+1234567890"
json_data = {
   # JSON response from the login function
}
otp = "123456"

response = asyncio.run(verify_otp(phone_number, json_data, otp))
print(response)
```

The `verify_otp` function returns a dictionary with the following keys:

- `status_code` (int): The status code of the request.
- `status` (int): The status code of the truecaller OTP verification.
- `message` (str): A message indicating the result of the OTP verification.
- `installationId` (str): The installation ID associated with the verified number.
- `ttl` (int): The time-to-live (TTL) value for the verification result in seconds.
- `userId` (int): The user ID associated with the verified number.
- `suspended` (bool): Indicates whether the account is suspended.
- `phones` (list): List of phone numbers associated with the user, each containing `phoneNumber`, `countryCode`, and `priority` keys.

### Phone Number Search

The `search_phonenumber` function allows you to search for a phone number using the Truecaller API.

```python
import asyncio
from truecallerpy import search_phonenumber

phone_number = "+1234567890"
country_code = "US"
installation_id = "Your installation ID"

response = asyncio.run(search_phonenumber(phone_number, country_code, installation_id))
print(response)
```

The `search_phonenumber` function returns a dictionary containing information about the phone number.

### Bulk Phone Number Search

The `bulk_search` function allows you to perform a bulk search for a list of phone numbers using the Truecaller API.

```python
import asyncio
from truecallerpy import bulk_search

phone_numbers = "+1234567890,9876543210"
country_code = "US"
installation_id = "Installation ID"

response = asyncio.run(bulk_search(phone_numbers, country_code, installation_id))
print(response)
```

The `bulk_search` function returns a dictionary containing information about the phone numbers.

## Contributing

Contributions to the TruecallerPy package are welcome! If you encounter any issues or have suggestions for improvements, please open an issue or submit a pull request on the project's GitHub repository.

## License

This project is licensed under the MIT License.

## Support

If you need any assistance or have questions, please contact [sumithemmadi244@gmail.com](mailto:sumithemmadi244@gmail.com).

Feel free to customize the documentation template according to your package's features and requirements. Provide detailed explanations and examples for each function, along with the necessary parameters and return types.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "truecallerpy",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "Sumith Emmadi <sumithemmadi244@gmail.com>",
    "keywords": "truecallerpy,truecaller,search,phone,number,phonenumber,information,mobile",
    "author": "",
    "author_email": "Sumith Emmadi <sumithemmadi244@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/c3/cc/6d9ca197f644455fcc2632a8adc325e78abc02621a405bdfa44659ef63ba/truecallerpy-1.0.3.tar.gz",
    "platform": null,
    "description": "# [Truecallerpy](https://github.com/sumithemmadi/truecallerpy)\n\n[![PyPI - Implementation](https://img.shields.io/pypi/v/truecallerpy?style=flat-square)](https://pypi.org/project/truecallerpy)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/truecallerpy?style=flat-square)](https://pypi.org/project/truecallerpy)\n[![Downloads](https://static.pepy.tech/badge/truecallerpy)](https://pepy.tech/project/truecallerpy)\n[![PyPI - License](https://img.shields.io/pypi/l/truecallerpy?style=flat-square)](https://github.com/sumithemmadi/truecallerpy/edit/main/LICENSE.md)\n\nTruecallerPy is a Python package that provides functionalities to interact with the Truecaller API. It allows you to perform login, OTP verification, and phone number search using Truecaller.\n\n**Table of Contents:**\n\n- [Truecallerpy](#truecallerpy)\n  - [Requirements](#requirements)\n  - [Command Line Usage](#command-line-usage)\n    - [Installation](#installation)\n    - [Login](#login)\n    - [InstallationId](#installationid)\n    - [Searching a Number](#searching-a-number)\n    - [Bulk Phone Number Search with cli](#bulk-phone-number-search-with-cli)\n  - [Basic Usage](#basic-usage)\n    - [Login Function](#login-function)\n    - [OTP Verification](#otp-verification)\n    - [Phone Number Search](#phone-number-search)\n    - [Bulk Phone Number Search](#bulk-phone-number-search)\n  - [Contributing](#contributing)\n  - [License](#license)\n  - [Support](#support)\n\n## Requirements\n\nTo use the TruecallerPy package, you need to meet the following requirements:\n\n- Valid Mobile Number (Phone number verification for Truecaller)\n- Truecaller InstallationId\n\n## Command Line Usage\n\n### Installation\n\nYou can install the TruecallerPy package using pip:\n\n```bash\npip install truecallerpy\n```\n\n### Login\n\nTo log in to your Truecaller account, use the following command:\n\n```bash\ntruecallerpy login\n```\n\nIf you encounter any errors, try running the command with administrative privilege (e.g., `sudo truecallerpy login` on Linux or running the command prompt as administrator on Windows).\n\n### InstallationId\n\nTo retrieve your Truecaller InstallationId, use the following command:\n\n```bash\ntruecallerpy --installationid\n```\n\nYou can also specify the `-i` flag to print only the InstallationId:\n\n```bash\ntruecallerpy -i -r\n```\n\n### Searching a Number\n\nTo search for a phone number using Truecaller, use the following command:\n\n```bash\ntruecallerpy -s [number]\n```\n\nFor example:\n\n```bash\ntruecallerpy -s 1234567890\n```\n\nThe command will return a JSON response containing information about the phone number.\n\nYou can use the `-r` flag to get the raw output (JSON) instead of the formatted output. For example:\n\n```bash\ntruecallerpy -s 1234567890 -r\n```\n\nYou can also use additional flags to extract specific information. For example, to print only the name associated with the phone number, use the `--name` flag:\n\n```bash\ntruecallerpy -s 1234567890 --name\n```\n\nSimilarly, you can use the `--email` flag to print only the email associated with the phone number.\n\n### Bulk Phone Number Search with cli\n\nTo perform a bulk search for multiple phone numbers, use the `--bs` flag followed by the numbers separated by commas. For example:\n\n```bash\ntruecallerpy --bs 9912345678,+14051234567,+919987654321\n```\n\nIn addition to the CLI, you can also use the TruecallerPy package in your Python code. The package provides various functions such as `login`, `verify_otp`, `search_phonenumber`, and `bulk_search`.\n\n## Basic Usage\n\n### Login Function\n\nThe `login` function is used to log in to the Truecaller service. It takes a phone number in international format as a parameter and returns a dictionary containing the login response details.\n\n```python\nimport asyncio\nfrom truecallerpy import login\n\nphone_number = \"+1234567890\"\nresponse = asyncio.run(login(phone_number))\nprint(response)\n```\n\nThe `login` function returns a dictionary with the following keys:\n\n- `status_code` (int): The status code of the  request.\n- `status` (int): The status code of the truecaller login request.\n- `message` (str): A message indicating the status of the login request.\n- `domain` (str): The domain associated with the phone number.\n- `parsedPhoneNumber` (int): The phone number without the country code.\n- `parsedCountryCode` (str): The country code associated with the phone number.\n- `requestId` (str): The unique identifier for the login request.\n- `method` (str): The method used for sending the OTP.\n- `tokenTtl` (int): The time-to-live (TTL) value for the OTP token in seconds.\n\n### OTP Verification\n\nThe `verify_otp` function is used to verify the mobile number with the OTP (One-Time Password) received.\n\n```python\nimport asyncio\nfrom truecallerpy import verify_otp\n\nphone_number = \"+1234567890\"\njson_data = {\n   # JSON response from the login function\n}\notp = \"123456\"\n\nresponse = asyncio.run(verify_otp(phone_number, json_data, otp))\nprint(response)\n```\n\nThe `verify_otp` function returns a dictionary with the following keys:\n\n- `status_code` (int): The status code of the request.\n- `status` (int): The status code of the truecaller OTP verification.\n- `message` (str): A message indicating the result of the OTP verification.\n- `installationId` (str): The installation ID associated with the verified number.\n- `ttl` (int): The time-to-live (TTL) value for the verification result in seconds.\n- `userId` (int): The user ID associated with the verified number.\n- `suspended` (bool): Indicates whether the account is suspended.\n- `phones` (list): List of phone numbers associated with the user, each containing `phoneNumber`, `countryCode`, and `priority` keys.\n\n### Phone Number Search\n\nThe `search_phonenumber` function allows you to search for a phone number using the Truecaller API.\n\n```python\nimport asyncio\nfrom truecallerpy import search_phonenumber\n\nphone_number = \"+1234567890\"\ncountry_code = \"US\"\ninstallation_id = \"Your installation ID\"\n\nresponse = asyncio.run(search_phonenumber(phone_number, country_code, installation_id))\nprint(response)\n```\n\nThe `search_phonenumber` function returns a dictionary containing information about the phone number.\n\n### Bulk Phone Number Search\n\nThe `bulk_search` function allows you to perform a bulk search for a list of phone numbers using the Truecaller API.\n\n```python\nimport asyncio\nfrom truecallerpy import bulk_search\n\nphone_numbers = \"+1234567890,9876543210\"\ncountry_code = \"US\"\ninstallation_id = \"Installation ID\"\n\nresponse = asyncio.run(bulk_search(phone_numbers, country_code, installation_id))\nprint(response)\n```\n\nThe `bulk_search` function returns a dictionary containing information about the phone numbers.\n\n## Contributing\n\nContributions to the TruecallerPy package are welcome! If you encounter any issues or have suggestions for improvements, please open an issue or submit a pull request on the project's GitHub repository.\n\n## License\n\nThis project is licensed under the MIT License.\n\n## Support\n\nIf you need any assistance or have questions, please contact [sumithemmadi244@gmail.com](mailto:sumithemmadi244@gmail.com).\n\nFeel free to customize the documentation template according to your package's features and requirements. Provide detailed explanations and examples for each function, along with the necessary parameters and return types.\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2022 Emmadi Sumith Kumar  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
    "summary": "TruecallerPy is a Python package that provides functionalities to interact with the Truecaller API. It allows you to perform login, OTP verification, and phone number search using Truecaller.",
    "version": "1.0.3",
    "project_urls": {
        "Bug Tracker": "https://github.com/sumithemmadi/truecallerpy/issues",
        "Changelog": "https://github.com/sumithemmadi/truecallerpy",
        "Documentation": "https://github.com/sumithemmadi/truecallerpy",
        "Homepage": "https://github.com/sumithemmadi/truecallerpy",
        "Repository": "https://github.com/sumithemmadi/truecallerpy"
    },
    "split_keywords": [
        "truecallerpy",
        "truecaller",
        "search",
        "phone",
        "number",
        "phonenumber",
        "information",
        "mobile"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "74151dd5190f4914c91dd48ff686d67e2cd3ca7aa8e97d3614d55571e1b3d518",
                "md5": "5c1af1984209fc3188fe6767289709f6",
                "sha256": "481271bd4aec2af310f8a8e1ea978398d8266e0f65ed2eff0f89e8536be4d1d2"
            },
            "downloads": -1,
            "filename": "truecallerpy-1.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5c1af1984209fc3188fe6767289709f6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 13427,
            "upload_time": "2023-08-17T20:08:43",
            "upload_time_iso_8601": "2023-08-17T20:08:43.732046Z",
            "url": "https://files.pythonhosted.org/packages/74/15/1dd5190f4914c91dd48ff686d67e2cd3ca7aa8e97d3614d55571e1b3d518/truecallerpy-1.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c3cc6d9ca197f644455fcc2632a8adc325e78abc02621a405bdfa44659ef63ba",
                "md5": "cd1a5cfb983bbda1e59b80bdf05c31d7",
                "sha256": "396166692de57d1b90dc448190164257de2e316a3f9ca7c955a37907ef3d3ee6"
            },
            "downloads": -1,
            "filename": "truecallerpy-1.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "cd1a5cfb983bbda1e59b80bdf05c31d7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 13186,
            "upload_time": "2023-08-17T20:08:45",
            "upload_time_iso_8601": "2023-08-17T20:08:45.314324Z",
            "url": "https://files.pythonhosted.org/packages/c3/cc/6d9ca197f644455fcc2632a8adc325e78abc02621a405bdfa44659ef63ba/truecallerpy-1.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-17 20:08:45",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "sumithemmadi",
    "github_project": "truecallerpy",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "truecallerpy"
}
        
Elapsed time: 0.32696s