Skip to main content

Official Python SDK for Dudwalls NoSQL Database

Project description

Dudwalls Python SDK

Official Python SDK for Dudwalls NoSQL Database - A modern, cloud-hosted database service with enterprise-grade features.

🚀 Features

  • NoSQL Document Store: Store JSON documents with no schema constraints
  • Cloud Storage: Secure, persistent storage on dedicated infrastructure
  • RESTful CRUD API: Full Create, Read, Update, Delete operations
  • Connection Pooling: Optimized performance with session reuse
  • Retry Logic: Automatic retry with exponential backoff
  • Type Hints: Full typing support for better development experience

📦 Installation

pip install dudwalls-python

🔑 Quick Start

1. Get Your API Key

Sign up at dudwalls.me and get your API key from the dashboard.

2. Basic Usage

import dudwalls

# Initialize client
client = dudwalls.Dudwalls('your-api-key-here')

# Get a collection
users = client.collection('myapp', 'users')

# Create a document
user = users.insert_one({
    'name': 'John Doe',
    'email': 'john@example.com',
    'age': 30
})
print(f"Created user: {user['id']}")

# Read a document
found_user = users.find_one(user['id'])
print(f"Found: {found_user['name']}")

# Update a document
updated = users.update_one(user['id'], {
    'age': 31,
    'updated': True
})
print(f"Updated: {updated['name']}")

# Find all documents
all_users = users.find()
print(f"Total users: {len(all_users)}")

# Delete a document
users.delete_one(user['id'])
print("User deleted")

# Clean up
client.close()

📚 API Reference

Client

client = dudwalls.Dudwalls(api_key, base_url='https://dudwalls.me/api/dudwalls')

Database Operations

# Get all databases
databases = client.get_databases()

# Create a database
client.create_database('myapp')

Collection Operations

collection = client.collection('database_name', 'collection_name')

# Insert documents
doc = collection.insert_one({'name': 'John'})
docs = collection.insert_many([{'name': 'Jane'}, {'name': 'Bob'}])

# Find documents
all_docs = collection.find()
doc = collection.find_one('document_id')
filtered = collection.find({'name': 'John'})

# Update documents
updated = collection.update_one('document_id', {'age': 25})

# Delete documents
collection.delete_one('document_id')

# Count documents
count = collection.count()

⚡ Performance Features

  • Session Pooling: Reuses HTTP connections for better performance
  • Retry Strategy: Automatic retries for failed requests (429, 5xx errors)
  • Keep-Alive: Persistent connections reduce latency
  • Timeout Control: 5-second timeouts prevent hanging requests

🔧 Advanced Usage

Custom Configuration

import dudwalls

# Custom base URL and SSL settings
client = dudwalls.Dudwalls(
    api_key='your-key',
    base_url='https://your-custom-domain.com/api/dudwalls',
    verify_ssl=True
)

Error Handling

try:
    doc = collection.insert_one({'name': 'Test'})
except Exception as e:
    print(f"Error: {e}")

Batch Operations

# Insert multiple documents efficiently
documents = [
    {'name': 'User 1', 'type': 'admin'},
    {'name': 'User 2', 'type': 'user'},
    {'name': 'User 3', 'type': 'user'}
]
result = collection.insert_many(documents)
print(f"Inserted {len(result['ids'])} documents")

💰 Pricing Plans

Free Tier

  • 2 databases, 5 collections per database
  • 1,000 documents total
  • 10,000 API calls/month
  • Perfect for development and testing

Paid Plans

  • Spark ($19/month): 100K documents, 1M API calls
  • Pro ($49/month): 1M documents, 10M API calls
  • Enterprise: Unlimited everything with SLA

View all plans →

🆘 Support

📄 License

MIT License - see LICENSE file for details.

🔗 Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dudwalls_python-1.0.4-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file dudwalls_python-1.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for dudwalls_python-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 d06c3defa724549928a23e8ca225788628996609a1c6c2d6600d2b08e99bab6c
MD5 74ad583bc233da30b469f96774009044
BLAKE2b-256 dc92edadaf45a42742cf5ebefd884b19989682c8a62fdcc63da40386a9a6aea8

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