Skip to main content

Official Python SDK for BugBountyKE-KSP platform API

Project description

BugBountyKE-KSP Python SDK

Official Python SDK for the BugBountyKE-KSP Platform.

pip install bugbounty-ksp

Features

  • ✨ Official SDK with full type hints
  • 🔐 Secure API key authentication
  • 📤 Publish articles with image support
  • ⚡ Comprehensive error handling
  • 🧪 98% test coverage (68 tests)
  • 📚 Full documentation & examples

Quick Start

from bugbounty_ksp import BugBountyKSPAPIClient
import os

# Get API key from environment
api_key = os.environ['BUGBOUNTY_API_KEY']

# Create client
client = BugBountyKSPAPIClient(api_key=api_key)

# Publish article
response = client.publish_article(
    title="Security Vulnerability Report",
    content="# Vulnerability Details\n\nDetails here...",
    frontmatter={
        "title": "Security Vulnerability Report",
        "tags": ["security", "bug-bounty"],
        "category": "web"
    },
    images={},
    file_path="/path/to/article.md"
)

print(f"Published! View at: {response.web_url}")

Installation

From PyPI (Recommended)

pip install bugbounty-ksp

From Source

git clone https://github.com/bugbountyksp/bugbounty-ksp-api-client.git
cd bugbounty-ksp-api-client
pip install -e .

Documentation

Getting Your API Key

  1. Log in to https://bugbountyke-ksp.com
  2. Go to Settings → API Keys
  3. Click "Generate New Key"
  4. Copy the key immediately (shown only once)
  5. Store securely in environment variables
# .env or environment
export BUGBOUNTY_API_KEY="sk_test_your_key_here"

Error Handling

from bugbounty_ksp import BugBountyKSPAPIClient
from bugbounty_ksp.api.exceptions import (
    ValidationError,
    AuthenticationError,
    APIError,
)

try:
    response = client.publish_article(...)
except ValidationError as e:
    print(f"Invalid input: {e}")
except AuthenticationError as e:
    print(f"Invalid API key: {e}")
except APIError as e:
    print(f"API error: {e}")

Development

# Setup
python -m venv venv
source venv/bin/activate
pip install -e ".[dev]"

# Run tests
pytest -v

# Code quality
black src/ tests/
flake8 src/ tests/
mypy src/

Testing

68 tests with 98% code coverage:

pytest -v --cov=bugbounty_ksp

Tests included for:

  • Authentication & API key validation
  • Article publishing & management
  • Error handling & edge cases
  • API key generation & security
  • Configuration & integration

License

MIT License - see LICENSE

Support


Made with ❤️ by BugBountyKE-KSP Team

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

bugbounty_ksp_api_client-1.0.0.tar.gz (14.4 kB view details)

Uploaded Source

Built Distribution

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

bugbounty_ksp_api_client-1.0.0-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

Details for the file bugbounty_ksp_api_client-1.0.0.tar.gz.

File metadata

File hashes

Hashes for bugbounty_ksp_api_client-1.0.0.tar.gz
Algorithm Hash digest
SHA256 dd4bfa24ef3f35da3544203e8ffcf7b0494696f8c944c5e136abe8df6cd31746
MD5 32c8aac23eda5adddcedb23c370ef0e5
BLAKE2b-256 87cec467c4451870d38f6bde606d3a7d518481fff9afc15b3ee983940454ed38

See more details on using hashes here.

File details

Details for the file bugbounty_ksp_api_client-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for bugbounty_ksp_api_client-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0d21f284816781b809926edff0e9689d25de01ec29b3e1930c4f73c0d997077b
MD5 28c3ecb67fa96f02bfd62f51a05a0b78
BLAKE2b-256 cdece417765136c18c5b9460bd639fa3e5bdd2dc8e77fa1db19ccc59fab42274

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