Skip to main content

A python library to consume Rattify API

Project description

rattifyapi-python

Python plugin for RattifApi View on pypi.python.org

Installation

pip install rattifyapi

Example

from rattifyapi.rattify import Rattify

secret_key = "rt_test_4973"

rattify = Rattify(secret_key=secret_key)

# to use transaction class
print(rattify.user.list())

# initiate a generic
data = {
    "first_name": "John",
    "last_name": "Doe",
    "email": "john.doe@email.com",
    "date_of_birth": "2000-12-24",
    "country": "Ghana",
}
print(rattify.generic.initialize(data))

# get user
print(rattify.user.verify(reference="e1b6679c5aad4bd3999953ac78e677a79d28d539085e409ebde1be640ebc27e7"))

Static Use

To start using the Rattify Python API, you need to start by setting your secret key.

You can set your secret key in your environment by running:

export SECRET_KEY = 'your_secret_secret_key'

After exporting the keys, you can use the api like this

from rattifyapi.generic import Generic
from rattifyapi.users import User

# list users
print(User.list())

# initiate a generic
data = {
    "first_name": "John",
    "last_name": "Doe",
    "email": "john.doe@email.com",
    "date_of_birth": "2000-12-24",
    "country": "Ghana",
}
print(Generic.initialize(data))

# get user
print(User.verify(reference="reference"))

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

rattifyapi-0.2.2-py3-none-any.whl (5.0 kB view hashes)

Uploaded Python 3

Supported by

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