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:
- 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
Contributing
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
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fbcd75cc25d9049c186bc08b639ad6e9f46c82ae4fa530f53b23fe75ef341d4b
|
|
| MD5 |
a1ca97f187c8695738cf2933adfba348
|
|
| BLAKE2b-256 |
f9460032424a8d796e2cfdd79259df2045ad7f2a18f58d9643d50cab5ef6ddd9
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e136e6b2bbebcc6dd81573fe097020e59b0510023a6b46ccecf69717694af67
|
|
| MD5 |
7f1fd023e247d6d902c897f456cfc9fe
|
|
| BLAKE2b-256 |
fbbb6bc07f9adad0766e670c40173241ff31f1ba8488f7719e8847bf7c83697f
|