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/yourusername/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: {token_result['token']}")

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/yourusername/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.0.tar.gz (6.3 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.0-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: databunkerpro-0.1.0.tar.gz
  • Upload date:
  • Size: 6.3 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.0.tar.gz
Algorithm Hash digest
SHA256 608a874f32f25d201ff2b1fe69987b2fb42f62634818d0d387fd3d566093a4f9
MD5 148afaa77139295ce03c936fd3f8776d
BLAKE2b-256 a416d3e490c475330562572643d748024ae5b3a028ab56810897986c7b873c78

See more details on using hashes here.

File details

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

File metadata

  • Download URL: databunkerpro-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.3 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 de188788bd462e892f1b114d3361ba07c44013d66369bced5fdf62a43162ac88
MD5 5245fb782de094dab4fefc0668440cc1
BLAKE2b-256 1ad7754d53c815639750d315124f21e35ef0f5775803f6e395419f97eb53922c

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