Skip to main content

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
  • Continuous security scanning (Semgrep SAST, pinned CI actions)

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

Security

This library is scanned on every push and pull request, with a weekly scheduled sweep to catch drift:

  • SAST (Semgrep): static analysis using the p/python, p/secrets, p/security-audit, and p/owasp-top-ten rulesets. A finding fails the check, and results are published to the repository's Code Scanning tab. See .github/workflows/semgrep.yml.
  • Supply-chain hardening: every GitHub Action is pinned to a full commit SHA, so a mutable tag (@v4) cannot be silently repointed to malicious code.

Reproduce the SAST scan locally:

pip install semgrep
semgrep scan \
    --config p/python \
    --config p/secrets \
    --config p/security-audit \
    --config p/owasp-top-ten

To report a security vulnerability, please email hello@databunker.org rather than opening a public issue.

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.

Metadata

Release files for databunkerpro 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for databunkerpro 0.1.5
File Size Uploaded Provenance Actions
databunkerpro-0.1.5.tar.gz 18.1 kB Without provenance Details for databunkerpro-0.1.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for databunkerpro 0.1.5
File Interpreter ABI Platform Actions
databunkerpro-0.1.5-py3-none-any.whl Python 3 none any Details for databunkerpro-0.1.5-py3-none-any.whl

Total release size: 30.0 kB

Release files / databunkerpro-0.1.5.tar.gz

Download URL databunkerpro-0.1.5.tar.gz
Size 18.1 kB
Tags Source
SHA-256 checksum
How to use checksums
a992f826411b0e6b3e963d908b307c97c0f5d83a2dc31c6cf31f82639c3bf9d4
BLAKE2b-256 checksum
How to use checksums
8b57fea0a12045ad351abcd24e37aaa848c86e510c519b7e1dbf0c61839b05ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.20

Release files / databunkerpro-0.1.5-py3-none-any.whl

Download URL databunkerpro-0.1.5-py3-none-any.whl
Size 11.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
12ac44da9f5a7c2513c9e096701da7969e677461468f94518717a633cabfa6af
BLAKE2b-256 checksum
How to use checksums
85b09bc785d2dfa1961ce610b9d4cc5255c895d36d1595100fd372810990b453
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.20

Security for databunkerpro 0.1.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page