Skip to main content

A simple python library for getting caller ID name information using the opencnam API.

Project description

# python-opencnam

A simple python library for getting caller ID name information.


This library uses [OpenCNAM]( “opencnam”) as a backend.

[![Build Status](](

## Installation

Install from PyPi using [pip](, a package manager for Python.

$ pip install opencnam

Don’t have pip installed? Try installing it, by running this from the command line:

$ curl | python

Or you can [download the source code]( “OpenCNAM source code”) for OpenCNAM, and then run:

$ python install

You may need to run the above commands with sudo.

## Usage

Using python-opencnam is easy:

from opencnam import Phone

phone = Phone('+16284003994')
print phone.number, phone.cnam

The main object, Phone, defined in the opencnam module accepts a phone number as input, and (behind the scenes) queries the [opencnam]( “opencnam”) API to set the Phone.cnam attribute.

## API Authentication

To specify your API credentials, just pass them into the Phone constructor, like so:

from opencnam import Phone

phone = Phone(‘+16284003994’, account_sid=’ACxxx’, auth_token=’AUxxx’)

## Changelog

v06: 2018-11-30

  • Use OpenCNAM v3.
  • Support only account_sid and auth_token for authentication, removing the deprecated api_user and api_key.
  • Support Python 2.7 and Python 3.7

v0.5: 2012-11-08

  • Add support for OpenCNAM V2 API.
  • Deprecate the api_user and api_key authentication parameters, in favor of account_sid and auth_token.

v0.4: 2012-07-10

  • Add 3 second timeout to CNAM lookups, so we won’t block for too long.

v0.3: 2012-07-09

  • Rewrite the backend to use requests instead of slumber.
  • Clean up documentation.
  • Add public tests via Travis CI.

v0.2: 2012-03-19

  • Support API authentication.

v0.1: 2012-02-26

  • Initial release!

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
opencnam-0.6-py3-none-any.whl (5.0 kB) Copy SHA256 hash SHA256 Wheel py3
opencnam-0.6.tar.gz (17.6 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page