Skip to main content

SDK for KillB API V2

Project description

Kill-B Python SDK

This is the official Python SDK for interacting with the Kill-B API V2.


Installation

You can install the SDK via pip:

  pip install killb-sdk-python

Requirements

This SDK requires only the requests library. You can install it using pip:

  pip install requests

Usage

Authentication

To start using the SDK, you need to authenticate with your Kill-B API credentials:

from killb.client import Client

# ENVIRONMENT -> available environment is SANDBOX and PRODUCTION - please test first to go to PRODUCTION

# Replace with your environment, email, password, and API key
client = Client(environment="SANDBOX", email="your@email.com", password="your_password",
                api_key="your_api_key")

Creating a User

You can create a user using the User class:

    user_data = {
            "type": "PERSON",
            "data": {
                "firstName": "Bruce",
                "lastName": "Wayne",
                "dateOfBirth": "1982-01-28",
                "email": "wayne@batman.com",
                "phone": "+5511933222111",
                "document": {
                    "type": "PASSPORT",
                    "number": "BAT0001",
                    "issuedCountryCode": "US"
                },
                "address": {
                    "street1": "Street1",
                    "zipCode": "00315",
                    "city": "Gotham",
                    "countryCode": "US",
                    "state": "GO"
                }
            }
    }

    user_client = client.User.create(user_data)
    print("User created successfully:", user_client)

Creating Account

You can create account using the Account class:

    account_data = {
	"type": "SPEI",
	"userId": user["id"],
	"data": {
		"firstName": "Selina",
		"lastName": "Kyle",
        "phone": "+5511933222111",
        "email": "selina@cat.com",
        "bankCode": "1211",
        "countryCode": "MX",
        "clabe": "ASDFASDFASDFA",
		"document": {
            "type": "PASSPORT",
			"number": "CAT221122",
			"issuedCountryCode": "US"
		    }
	    }
    }

    account = client.Account.create(account_data)
    print("Account created successfully:", account)

For more detailed documentation and examples, please refer to the API documentation.

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

killb_sdk_python-1.0.3.tar.gz (10.8 kB view details)

Uploaded Source

Built Distribution

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

killb_sdk_python-1.0.3-py3-none-any.whl (14.7 kB view details)

Uploaded Python 3

File details

Details for the file killb_sdk_python-1.0.3.tar.gz.

File metadata

  • Download URL: killb_sdk_python-1.0.3.tar.gz
  • Upload date:
  • Size: 10.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for killb_sdk_python-1.0.3.tar.gz
Algorithm Hash digest
SHA256 63240bd8a23ce19d24a1a86c663b0fc8539e4ac60c9f8e055120ce7ca76fc434
MD5 2dbd66ca2080614cb1ad6fc7a9c84ddf
BLAKE2b-256 65b1c9993e235d9e4a727e6190e536a7b8f5ff4e26ab6c295f4e04a5d3df7584

See more details on using hashes here.

File details

Details for the file killb_sdk_python-1.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for killb_sdk_python-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 1465eabdebded78d390416de43f532bfecea317b776eff49fc62b99f11513a86
MD5 26401777d1d0bf5389d331d98aab37de
BLAKE2b-256 70114ffbea27e5ece33722499306a716d5ed0913026cfefd1a02f7b1eb2f4704

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