Skip to main content

Python client library for DatabunkerPro API

Project description

DatabunkerPro Python Client

A Python client library for interacting with the DatabunkerPro API. This library provides a simple and intuitive interface for managing user data, tokens, and other DatabunkerPro features.

Installation

You can install the package using pip:

pip install databunkerpro

Or install directly from GitHub:

pip install git+https://github.com/securitybunker/databunkerpro-python.git

Quick Start

from databunkerpro import DatabunkerproAPI

# Initialize the client
api = DatabunkerproAPI(
    base_url="https://pro.databunker.org",
    x_bunker_token="your-api-token",
    x_bunker_tenant="your-tenant-name"
)

# Create a new user
user_data = {
    "email": "user@example.com",
    "name": "John Doe",
    "phone": "+1234567890"
}
result = api.create_user(user_data)
print(f"Created user with token: {result['token']}")

# Get user information
user = api.get_user("email", "user@example.com")
print(f"User profile: {user['profile']}")

# Update user information
update_data = {
    "name": "John Updated",
    "phone": "+0987654321"
}
api.update_user("email", "user@example.com", update_data)

# Create a token for sensitive data
token_result = api.create_token("creditcard", "4111111111111111")
print(f"Created token in base format (credit card): {token_result['tokenbase']}")
print(f"Created token in uuid format: {token_result['tokenuuid']}")

Features

  • User Management (create, read, update, delete)
  • Token Management
  • System Statistics
  • Type hints and comprehensive documentation
  • Error handling and validation

Development

To set up the development environment:

  1. Clone the repository:
git clone https://github.com/securitybunker/databunkerpro-python.git
cd databunkerpro-python
  1. Install development dependencies:
pip install -e ".[dev]"
  1. Run tests:
pytest

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

If you encounter any issues or have questions, please open an issue on GitHub.

API Documentation

For detailed API documentation, please visit the DatabunkerPro 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

databunkerpro-0.1.1.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

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

databunkerpro-0.1.1-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file databunkerpro-0.1.1.tar.gz.

File metadata

  • Download URL: databunkerpro-0.1.1.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.17

File hashes

Hashes for databunkerpro-0.1.1.tar.gz
Algorithm Hash digest
SHA256 17773a68509a3a74531d7c5c1bb4148f1a933712a8baa1d6e9d9e11326ec2c89
MD5 e10b1af34c7caac6f82c14088a1382cc
BLAKE2b-256 fdb34f50e9565d15159cca0b2ea599967469ce0e589a955fa96f5f26915f74a7

See more details on using hashes here.

File details

Details for the file databunkerpro-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: databunkerpro-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.17

File hashes

Hashes for databunkerpro-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 199207949e36354ac258e61f68574380242cc8f5358b6c7c30e2400af52b3dc9
MD5 85b443eecfcbd613568c4a624d11b5bd
BLAKE2b-256 6243f2e10ccbba31bfd2c2dd17f0acbcd7ecc83e681a80a8838abea19d92c22c

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