Skip to main content

A simple python client for Kobana API

Project description

pyKobana Library

A Python library to access Kobana API through HTTP requests.

Installation

pip install pyKobana

Usage

from pyKobana import Kobana

# Initialize the Kobana client
kobana = Kobana("dev", "YOUR_API_TOKEN")

# Get wallets
wallets = kobana.get_wallets()
print(wallets)

Methods

Kobana.get_wallets()

Fetches the list of wallets.

Returns:

  • list: A list of wallet objects.

Kobana.get_wallet(wallet_id)

Fetches details of a specific wallet.

Parameters:

  • wallet_id (str): The ID of the wallet to fetch.

Returns:

  • dict: A dictionary containing wallet details.

Kobana.create_wallet(data)

Creates a new wallet.

Parameters:

  • data (dict): A dictionary containing wallet creation data.

Returns:

  • dict: A dictionary containing the created wallet details.

Kobana.update_wallet(wallet_id, data)

Updates an existing wallet.

Parameters:

  • wallet_id (str): The ID of the wallet to update.
  • data (dict): A dictionary containing wallet update data.

Returns:

  • dict: A dictionary containing the updated wallet details.

Kobana.delete_wallet(wallet_id)

Deletes a wallet.

Parameters:

  • wallet_id (str): The ID of the wallet to delete.

Returns:

  • None

Example

from pyKobana import Kobana

# Initialize the Kobana client
kobana = Kobana("dev", "YOUR_API_TOKEN")

# Create a new wallet
new_wallet = kobana.create_wallet({"name": "New Wallet"})
print(new_wallet)

# Get details of a specific wallet
wallet = kobana.get_wallet(new_wallet["id"])
print(wallet)

# Update the wallet
updated_wallet = kobana.update_wallet(new_wallet["id"], {"name": "Updated Wallet"})
print(updated_wallet)

# Delete the wallet
kobana.delete_wallet(new_wallet["id"])
print("Wallet deleted")

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

pykobana-0.0.2.tar.gz (2.1 kB view details)

Uploaded Source

Built Distribution

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

pyKobana-0.0.2-py3-none-any.whl (1.7 kB view details)

Uploaded Python 3

File details

Details for the file pykobana-0.0.2.tar.gz.

File metadata

  • Download URL: pykobana-0.0.2.tar.gz
  • Upload date:
  • Size: 2.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.3

File hashes

Hashes for pykobana-0.0.2.tar.gz
Algorithm Hash digest
SHA256 8eebaef815ddf737327e74db4f1afee3cb5c6fa9bfe702b7926908868a4d6cd8
MD5 6b26316dff2dde151e507b1b6dc394a6
BLAKE2b-256 a5428d43580335cab6b4ac6a8f6617be152758f384815df0e68846f0d70b0001

See more details on using hashes here.

File details

Details for the file pyKobana-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: pyKobana-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 1.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.3

File hashes

Hashes for pyKobana-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 041aeef5e8db24b004149c6fa1442200d973d0372eb9e43593c83edd5a9b2c52
MD5 47e482c19ad9b5089ffb5f484995af37
BLAKE2b-256 bdcf0aa4a460f6b3ce644fc46e4045ccc16e6dcd3b203b9cf12cecac47462f3a

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