# pycarta Examples

This directory contains comprehensive Jupyter notebook examples demonstrating all features of pycarta.

## 📚 Notebooks

| Notebook | Topic | Prerequisites | Time |
|----------|-------|---------------|------|
| [00_index.ipynb](00_index.ipynb) | **Overview & Quick Start** | None | 10 min |
| [01_authentication.ipynb](01_authentication.ipynb) | **Authentication & Authorization** | Carta credentials | 20 min |
| [02_admin.ipynb](02_admin.ipynb) | **Administrative Functions** | Admin privileges | 30 min |
| [03_services.ipynb](03_services.ipynb) | **Service Development** | REST API knowledge | 60 min |
| [04_mqtt.ipynb](04_mqtt.ipynb) | **MQTT Messaging** | MQTT basics | 45 min |
| [05_data_management.ipynb](05_data_management.ipynb) | **Data Management** | JSON Schema helpful | 50 min |
| [06_seven_bridges.ipynb](06_seven_bridges.ipynb) | **Seven Bridges Integration** | SBG platform access | 75 min |

## 🚀 Quick Start

1. **Start Here**: Open [00_index.ipynb](00_index.ipynb) for overview and setup
2. **Authentication**: Run [01_authentication.ipynb](01_authentication.ipynb) to configure credentials
3. **Choose Your Path**: Select notebooks based on your use case

## 📋 Prerequisites

### Required
- Python 3.12+
- Jupyter Notebook or JupyterLab
- pycarta installed: `pip install pycarta`
- Valid Carta account credentials

### Optional (feature-specific)
- Administrative privileges (user/group management)
- Seven Bridges platform access (computational workflows)
- MQTT broker access (messaging features)
- Project access (FormsDB data management)

## 🎯 Learning Paths

### For API Developers
1. Authentication → Services → Admin

### For Data Scientists  
1. Authentication → Data Management → Seven Bridges

### For IoT Developers
1. Authentication → MQTT → Services

### For System Administrators
1. Authentication → Admin → Services

## 💡 Key Features Demonstrated

- **Authentication**: Multiple login methods, profiles, authorization decorators
- **Services**: REST API creation, FastAPI integration, automatic documentation
- **MQTT**: Real-time messaging, publish/subscribe patterns, async operations
- **Data Management**: FormsDB schemas, Tablify conversions, graph operations
- **Seven Bridges**: Cloud computation, workflow automation, file management
- **Administration**: User/group management, permissions, secrets

## 🔧 Common Use Cases

Each notebook includes practical examples for:
- Building data analysis services
- Creating IoT data pipelines  
- Developing collaborative research platforms
- Implementing secure API architectures
- Automating computational workflows

## 📖 Code Validation

All code snippets in these notebooks are:
- Extracted from official documentation
- Organized by module and functionality
- Designed to be runnable (with proper credentials)
- Commented for clarity and learning
- Following pycarta best practices

## 🛠️ Running the Examples

1. **Clone or download** the pycarta repository
2. **Install dependencies**: `pip install pycarta jupyter`
3. **Start Jupyter**: `jupyter notebook` or `jupyter lab`
4. **Open** the notebooks in order
5. **Configure** your credentials as shown in authentication notebook
6. **Run** the examples and experiment

## 🔗 Additional Resources

- **Documentation**: Complete API reference
- **Repository**: [pycarta on GitLab](https://gitlab.com/contextualize/pycarta)
- **Support**: customer.service@contextualize.us.com
- **Feature Requests**: Submit via project email

## 📝 Contributing

Found issues or have improvements?
- Submit bug reports or feature requests
- Contribute example improvements
- Share your own use cases

Happy learning with pycarta! 🎉