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.3.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.3-py3-none-any.whl (1.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pykobana-0.0.3.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.3.tar.gz
Algorithm Hash digest
SHA256 f8fc0a200a140df07ac2ed8ca07ad3b99aefdbfaf8c20db7ebdd14960115fe24
MD5 b57f04e09cbc119734eb43f51f0e3a4c
BLAKE2b-256 627da6b4dc0a6edd0514266b2751c15d279148e5769c6691c9fb508d4be04a7b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyKobana-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 1.8 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 7806e997d47872a2a18ae3a7743e524683849b6d8025773256146cfdb007efc6
MD5 348fbfdbd1ebef230b949c7456e59371
BLAKE2b-256 80927e3e93f5e5279c55e49713c3cba575cd468b432ee6f28270c84a49a7ccbb

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