Metadata-Version: 2.1
Name: dudwalls-python
Version: 1.0.4
Summary: Official Python SDK for Dudwalls NoSQL Database
Home-page: https://github.com/dudwalls/dudwalls-python
Author: Dudwalls Team
Author-email: support@dudwalls.me
Project-URL: Homepage, https://dudwalls.me
Project-URL: Documentation, https://dudwalls.me/docs
Project-URL: Source, https://github.com/dudwalls/dudwalls-python
Project-URL: Tracker, https://github.com/dudwalls/dudwalls-python/issues
Keywords: database nosql cloud api sdk dudwalls
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Database
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests >=2.25.0
Requires-Dist: urllib3 >=1.26.0

# 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

```bash
pip install dudwalls-python
```

## 🔑 Quick Start

### 1. Get Your API Key
Sign up at [dudwalls.me](https://dudwalls.me) and get your API key from the dashboard.

### 2. Basic Usage

```python
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

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

### Database Operations

```python
# Get all databases
databases = client.get_databases()

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

### Collection Operations

```python
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

```python
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

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

### Batch Operations

```python
# 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 →](https://dudwalls.me/pricing)

## 🆘 Support

- **Documentation**: [dudwalls.me/docs](https://dudwalls.me/docs)
- **Email**: support@dudwalls.com
- **GitHub**: [github.com/dudwalls/dudwalls-python](https://github.com/dudwalls/dudwalls-python)

## 📄 License

MIT License - see [LICENSE](LICENSE) file for details.

## 🔗 Links

- **Website**: [dudwalls.me](https://dudwalls.me)
- **Dashboard**: [dudwalls.me/dashboard](https://dudwalls.me/dashboard)
- **JavaScript SDK**: [npm: dudwalls-js](https://www.npmjs.com/package/dudwalls-js)
- **API Documentation**: [dudwalls.me/docs/api](https://dudwalls.me/docs/api)
