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.2.tar.gz
(10.8 kB
view hashes)
Built Distribution
Close
Hashes for killb_sdk_python-1.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1eaeabc74505df88d9db059350851b2217c09dd56dff5cf5e3af132dc6e1bda9 |
|
MD5 | d8882efe6cddeb0d2ad0fc90aa47d280 |
|
BLAKE2b-256 | 87c147e4c64a29eaaeaa1b7c1098e4f7c0ff346b34c33c740176da88520e3924 |