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 details)

Uploaded Python 3

File details

Details for the file rattifyapi-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: rattifyapi-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.12

File hashes

Hashes for rattifyapi-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5ff87dd00455fab327612e9e88d960161582083561add07639349b1821e37aa4
MD5 08b45cb70486f19552ef2a15f3626690
BLAKE2b-256 e04e35361b9f31fed0d94c6662d1af1d1307bc6732220bcf3619033fbd195153

See more details on using hashes here.

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