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.
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
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": "[email protected]",
"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", "[email protected]")
print(f"User profile: {user['profile']}")
# Update user information
update_data = {
"name": "John Updated",
"phone": "+0987654321"
}
api.update_user("email", "[email protected]", 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']}")
- User Management (create, read, update, delete)
- Token Management
- System Statistics
- Type hints and comprehensive documentation
- Error handling and validation
To set up the development environment:
- Clone the repository:
git clone https://github.com/securitybunker/databunkerpro-python.git
cd databunkerpro-python
- Install development dependencies:
pip install -e ".[dev]"
- Run tests:
pytest
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
If you encounter any issues or have questions, please open an issue on GitHub.
For detailed API documentation, please visit the DatabunkerPro API Documentation.