Skip to main content

SDK to communicate with data-grid API

Project description

DATA-GRID-SURFACE

SDK to communicate with data-grid API service. It uses the API service and it's end-points to determine if the given emails or passwords have been compromised.

Installation

Install data-grid-surface SDK:

pip install data-grid-surface

Using data-grid-access sdk

Import DataGrid class from library

from data_grid_surface.data_grid import DataGrid

You will need to provide username and password parameters to DataGrid class constructor. These are credentials for data-grid API service.

NOTE: Passwords and emails are hashed with SHA256 algorithm before being sent to the API service.

DataGrid methods

DataGrid methods return dictionary as a result.

You can pass raw email/password or its hashed value. If you are passing hashed value you need to hash it with SHA256 algorithm and encode it in base64 format.

Methods:

  • check_email(email, is_hashed)

    • email <String>
    • is_hashed <Boolean> default value is True
  • check_password(password, is_hashed)

    • password <String>
    • is_hashed <Boolean> default value is True
  • check_phone_number(phone_number, is_hashed)

    • phone_number <String>
    • is_hashed <Boolean> default value is True

Use example:

from data_grid_surface.data_grid import DataGrid

dg = DataGrid(
    username=<datagridapiusername>, 
    password=<datagridapipassword>
)
res = dg.check_email('email@example.com', False)
res = dg.check_password('passwordexample', False)
res = dg.check_phone_number('+38164....', False)

Response:

{
    'status': 'success', 
    'data': {
        'exposed': True|False,
        'breach_source': 'facebook'
    }
}

Project details


Download files

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

Source Distribution

data_grid_surface-1.2.0.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

data_grid_surface-1.2.0-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file data_grid_surface-1.2.0.tar.gz.

File metadata

  • Download URL: data_grid_surface-1.2.0.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.8.2 Darwin/19.6.0

File hashes

Hashes for data_grid_surface-1.2.0.tar.gz
Algorithm Hash digest
SHA256 d4cdb2a4f6d9de62401b2a23dac16b59df5add9c12db3837845e50765dc1d3ee
MD5 355fb892a3f02495cf41416d06f55684
BLAKE2b-256 367f2f924874e7afe22897ae36a2fdc93a8ed529c304e794ce089ea5cfb70a22

See more details on using hashes here.

File details

Details for the file data_grid_surface-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: data_grid_surface-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.8.2 Darwin/19.6.0

File hashes

Hashes for data_grid_surface-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b878c59eee5035de4b6eaafc16c0b415431564f9c4d58c0ba63e28064cb5e700
MD5 00b3e4143057a5bcd8698bc9c6652d23
BLAKE2b-256 86bc3d5169f835050c5feb04552f46b926037b736b4ac15347609a89e1fb6c81

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page