Skip to main content

Python client library for DatabunkerPro API

Project description

Databunker Pro 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)
  • Credit Card Management
  • 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.4.tar.gz (15.9 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.4-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: databunkerpro-0.1.4.tar.gz
  • Upload date:
  • Size: 15.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.20

File hashes

Hashes for databunkerpro-0.1.4.tar.gz
Algorithm Hash digest
SHA256 fbcd75cc25d9049c186bc08b639ad6e9f46c82ae4fa530f53b23fe75ef341d4b
MD5 a1ca97f187c8695738cf2933adfba348
BLAKE2b-256 f9460032424a8d796e2cfdd79259df2045ad7f2a18f58d9643d50cab5ef6ddd9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: databunkerpro-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 11.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.20

File hashes

Hashes for databunkerpro-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 3e136e6b2bbebcc6dd81573fe097020e59b0510023a6b46ccecf69717694af67
MD5 7f1fd023e247d6d902c897f456cfc9fe
BLAKE2b-256 fbbb6bc07f9adad0766e670c40173241ff31f1ba8488f7719e8847bf7c83697f

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