celestra


Namecelestra JSON
Version 0.0.2 PyPI version JSON
download
home_pageNone
SummaryA Python DSL for generating Kubernetes manifests with minimal complexity
upload_time2025-07-28 16:20:06
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseMIT
keywords kubernetes yaml docker-compose helm infrastructure-as-code dsl deployment cloud-native devops containers
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Celestra πŸš€

> **Transform your application deployments with a simple Python DSL**

Celestra is a powerful Domain-Specific Language (DSL) that lets you define cloud-native applications using simple Python code and automatically generates production-ready Kubernetes manifests, Docker Compose files, Helm charts, and more.

## ✨ Why Celestra?

**Before (Traditional YAML):**
```yaml
# 100+ lines of complex YAML for a simple web app
apiVersion: apps/v1
kind: Deployment
metadata:
  name: web-app
spec:
  replicas: 3
  selector:
    matchLabels:
      app: web-app
  template:
    metadata:
      labels:
        app: web-app
    spec:
      containers:
      - name: web-app
        image: web-server:latest
        ports:
        - containerPort: 8080
        resources:
          requests:
            cpu: 500m
            memory: 512Mi
          limits:
            cpu: 1000m
            memory: 1Gi
# ... and much more YAML
```

**After (Celestra):**
```python
from celestra import App

web_app = (App("web-app")
    .image("web-server:latest")
    .port(8080)
    .resources(cpu="500m", memory="512Mi", cpu_limit="1000m", memory_limit="1Gi")
    .replicas(3)
    .expose())

# Generate everything
web_app.generate().to_yaml("./k8s/")                    # Kubernetes manifests
web_app.generate().to_docker_compose("./docker-compose.yml")  # Local development
web_app.generate().to_helm_chart("./charts/")           # Helm packaging
```

## 🎯 Key Features

- **🐍 Python-First:** Write infrastructure as code using familiar Python syntax
- **🎭 Multi-Format Output:** Generate Kubernetes, Docker Compose, Helm, Kustomize from the same code
- **πŸ”’ Production-Ready:** Built-in security, monitoring, secrets management, and RBAC
- **πŸš€ Zero-Downtime Deployments:** Blue-green, canary, and rolling update strategies
- **πŸ”§ Extensible:** Plugin system for custom requirements and integrations
- **πŸ’‘ Developer Friendly:** Start with Docker Compose, deploy to Kubernetes seamlessly

## πŸš€ Quick Start

### Installation
```bash

# install from PyPI 
pip install celestra

# Or from source (recommended for development)
git clone https://github.com/your-org/celestra.git
cd celestra
pip install -e src/

```

### Create Your First App
```python
# app.py
from celestra import App, StatefulApp, Secret

# Database with automatic backups
db = (StatefulApp("database")
    .image("postgres:15")
    .port(5432)
    .storage("20Gi"))

# Database credentials
db_secret = (Secret("db-creds")
    .add("username", "admin")
    .add("password", "secure-password"))

# Web application
app = (App("blog")
    .image("webapp:latest")
    .port(8080)
    .replicas(3)
    .expose())

# Generate and deploy
app.generate().to_yaml("./k8s/")
db.generate().to_yaml("./k8s/")
db_secret.generate().to_yaml("./k8s/")
```

### Deploy Locally
```bash
# Generate Kubernetes manifests
python app.py

# Deploy to Kubernetes
kubectl apply -f ./k8s/
```

## πŸ—οΈ Architecture

Celestra abstracts Kubernetes complexity while maintaining full power:

```
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Python DSL    │───▢│   Celestra Core  │───▢│   Output Files  β”‚
β”‚                 β”‚    β”‚                  β”‚    β”‚                 β”‚
β”‚ β€’ Apps          β”‚    β”‚ β€’ Validation     β”‚    β”‚ β€’ Kubernetes    β”‚
β”‚ β€’ StatefulApps  β”‚    β”‚ β€’ Templates      β”‚    β”‚ β€’ Docker Composeβ”‚
β”‚ β€’ Secrets       β”‚    β”‚ β€’ Plugins        β”‚    β”‚ β€’ Helm Charts   β”‚
β”‚ β€’ Jobs          β”‚    β”‚ β€’ Optimization   β”‚    β”‚ β€’ Kustomize     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
```

## 🎨 Real-World Examples

### Microservices Platform
```python
from celestra import AppGroup, App, StatefulApp

platform = AppGroup("ecommerce")

# Shared infrastructure
database = StatefulApp("database").image("postgres:15").port(5432).storage("100Gi")
cache = StatefulApp("cache").image("redis:7").port(6379).storage("10Gi")

# Microservices
user_service = App("users").image("myorg/users:v1.0").port(8080)
product_service = App("products").image("myorg/products:v1.0").port(8081)
order_service = App("orders").image("myorg/orders:v1.0").port(8082)

platform.add([database, cache, user_service, product_service, order_service])
platform.generate().to_yaml("./k8s/")
```

### ML Training Pipeline
```python
from celestra import Job, CronJob

# One-time training job
training = (Job("model-training")
    .image("ml-framework:latest")
    .resources(cpu="4000m", memory="16Gi")
    .timeout("6h"))

# Scheduled retraining
retrain = (CronJob("model-retrain")
    .image("ml-framework:latest")
    .schedule("0 2 * * 0")  # Weekly
    .resources(cpu="8000m", memory="32Gi"))

training.generate().to_yaml("./jobs/")
retrain.generate().to_yaml("./jobs/")
```

### Complete Web Application
```python
from celestra import App, StatefulApp, Secret, Service, Ingress

# Database
db_secret = Secret("db-secret").add("password", "secure-password")
database = (StatefulApp("database")
    .image("postgres:15")
    .port(5432)
    .storage("50Gi")
    .add_secrets([db_secret]))

# Backend API
api = (App("api")
    .image("myapp/api:latest")
    .port(8080)
    .replicas(3)
    .add_secrets([db_secret]))

# Frontend
frontend = (App("frontend")
    .image("myapp/frontend:latest")
    .port(80)
    .replicas(2))

# Services
api_service = Service("api-service").add_app(api)
frontend_service = Service("frontend-service").add_app(frontend)

# Ingress
ingress = (Ingress("app-ingress")
    .domain("myapp.com")
    .route("/api", api_service)
    .route("/", frontend_service))

# Generate all components
for component in [db_secret, database, api, frontend, api_service, frontend_service, ingress]:
    component.generate().to_yaml("./k8s/")
```

## πŸ“š Documentation

- **[πŸ“– Complete Documentation](./docs/)** - Full documentation site
- **[πŸš€ Getting Started](./docs/getting-started/)** - Installation and first steps
- **[πŸ“š API Reference](./docs/api-reference/)** - Complete API documentation
- **[🎯 Examples](./docs/examples/)** - Real-world examples and tutorials
- **[πŸ”§ Components](./docs/components/)** - All available components
- **[βš™οΈ Configuration](./docs/configuration/)** - Configuration options

## πŸ“¦ Available Components

### Core Components
- **`App`** - Stateless applications (Deployments)
- **`StatefulApp`** - Stateful applications (StatefulSets)
- **`AppGroup`** - Group multiple applications together

### Workloads
- **`Job`** - One-time tasks
- **`CronJob`** - Scheduled tasks
- **`Lifecycle`** - Lifecycle hooks

### Networking
- **`Service`** - Service definitions
- **`Ingress`** - Ingress controllers
- **`NetworkPolicy`** - Network policies

### Security
- **`Secret`** - Secret management
- **`ServiceAccount`** - Service accounts
- **`Role`** / **`ClusterRole`** - RBAC roles
- **`RoleBinding`** / **`ClusterRoleBinding`** - RBAC bindings
- **`SecurityPolicy`** - Security policies

### Storage
- **`ConfigMap`** - Configuration management

### Advanced Features
- **`Observability`** - Monitoring and logging
- **`DeploymentStrategy`** - Deployment strategies
- **`CostOptimization`** - Resource optimization
- **`CustomResource`** - Custom resource definitions

## 🌟 Why Choose Celestra?

### For Developers
- **No YAML Hell** - Write infrastructure in Python
- **Fast Iteration** - Start local, deploy anywhere
- **Type Safety** - Catch errors before deployment
- **Familiar Syntax - If you know Python, you know Celestra

### For DevOps Teams
- **Standardization** - Consistent deployments across teams
- **Security Built-in** - RBAC, secrets, policies by default
- **Multi-Environment** - Dev, staging, prod from same code
- **Observability Ready** - Monitoring and logging included

### For Organizations
- **Reduced Complexity** - Abstract Kubernetes details
- **Faster Onboarding** - Developers focus on business logic  
- **Cost Optimization** - Built-in resource management
- **Compliance Ready** - Security and governance features

## πŸ§ͺ Running Examples

```bash
# Run comprehensive examples
cd src/examples

# Multiple ports showcase
python multiple_ports_showcase.py

# Enterprise validation demo
python enterprise_validation_demo.py

# Complete platform demo
python complete_platform_demo.py

# RBAC security demo
python rbac_security_demo.py

# Kubernetes YAML generation example
python kubernetes_yaml_generation_example.py
```

## ⚠️ Format-Specific Methods & Output Awareness

Celestra supports multiple output formats (Kubernetes, Docker Compose, Helm, etc.). Some methods are only meaningful for certain formats. **Celestra will automatically warn you if you use a method that is not supported in your chosen output format!**

### 🐳 Docker Compose-Only Methods
- `.port_mapping(host_port, container_port, ...)` β€” Only for Docker Compose (host:container mapping)
- `.expose_port(port, ..., external_port=...)` β€” Only for Docker Compose

### ☸️ Kubernetes-Only Methods
- `.node_selector({...})` β€” Only for Kubernetes (pod scheduling)
- `.tolerations([...])` β€” Only for Kubernetes (taints/tolerations)

### πŸ”„ Universal Methods
- `.port(port)` β€” Works everywhere (container port)
- `.image(image)` β€” Works everywhere
- `.replicas(n)` β€” Works everywhere
- `.env(key, value)` β€” Works everywhere

### 🚦 How It Works
- If you use `.port_mapping()` and generate Kubernetes YAML, you will see:
  ```
  ⚠️  Method 'port_mapping()' is Docker Compose-specific and will be ignored in Kubernetes output. For Kubernetes, use 'port()' + 'Service' instead of 'port_mapping()'.
  ```
- If you use `.node_selector()` and generate Docker Compose, you will see:
  ```
  ⚠️  Method 'node_selector()' is Kubernetes-specific and will be ignored in Docker Compose output.
  ```

### 🏷️ Decorators for Custom Extensions
You can mark your own methods as format-specific using built-in decorators:
```python
from celestra import docker_compose_only, kubernetes_only, output_formats

@docker_compose_only
def my_compose_method(self, ...): ...

@kubernetes_only
def my_k8s_method(self, ...): ...

@output_formats('kubernetes', 'helm')
def my_multi_format_method(self, ...): ...
```

### πŸ’‘ Best Practice
- **For Docker Compose:** Use `.port_mapping()` for host:container mapping
- **For Kubernetes:** Use `.port()` and create a `Service` for exposure
- **Universal:** Use `.port()`, `.image()`, `.replicas()`, `.env()`, etc.

Celestra will always guide you with clear warnings and suggestions if you use a method in the wrong context!

## 🀝 Contributing

We welcome contributions! Here's how to get started:

1. **Fork the repository**
2. **Create a feature branch**: `git checkout -b feature/amazing-feature`
3. **Make your changes** and add tests
4. **Run tests**: `python run_tests.py`
5. **Submit a pull request**

See our [Contributing Guide](./CONTRIBUTING.md) for detailed guidelines.

## πŸ“„ License

This project is licensed under the MIT License - see the [LICENSE](./LICENSE) file for details.

## πŸŽ‰ Get Started Now

```bash
# Install Celestra from source
git clone https://github.com/your-org/celestra.git
cd celestra
pip install -e src/

# Create your first application
cat > my_app.py << EOF
from celestra import App

app = (App("hello-world")
    .image("nginxdemos/hello:latest")
    .port(80)
    .replicas(2)
    .expose())

app.generate().to_yaml("./k8s/")
print("βœ… Kubernetes manifests generated in ./k8s/")
EOF

# Generate and deploy
python my_app.py
kubectl apply -f ./k8s/
```

**Ready to simplify your Kubernetes deployments?** [Check out the complete documentation](./docs/) and join thousands of developers already using Celestra! πŸš€

---

<div align="center">

**[Documentation](./docs/) β€’ [Examples](./docs/examples/) β€’ [API Reference](./docs/api-reference/) β€’ [Components](./docs/components/)**

Made with ❀️ by the Celestra community

</div>

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "celestra",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "Shivendra Pratap Singh <shivendrapsingh014@gmail.com>",
    "keywords": "kubernetes, yaml, docker-compose, helm, infrastructure-as-code, dsl, deployment, cloud-native, devops, containers",
    "author": null,
    "author_email": "Shivendra Pratap Singh <shivendrapsingh014@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/dc/85/e4cc65b9d5e03f92210d83bdb8a39b5a784a6880fad75ea9a4f4603cbc0d/celestra-0.0.2.tar.gz",
    "platform": null,
    "description": "# Celestra \ud83d\ude80\n\n> **Transform your application deployments with a simple Python DSL**\n\nCelestra is a powerful Domain-Specific Language (DSL) that lets you define cloud-native applications using simple Python code and automatically generates production-ready Kubernetes manifests, Docker Compose files, Helm charts, and more.\n\n## \u2728 Why Celestra?\n\n**Before (Traditional YAML):**\n```yaml\n# 100+ lines of complex YAML for a simple web app\napiVersion: apps/v1\nkind: Deployment\nmetadata:\n  name: web-app\nspec:\n  replicas: 3\n  selector:\n    matchLabels:\n      app: web-app\n  template:\n    metadata:\n      labels:\n        app: web-app\n    spec:\n      containers:\n      - name: web-app\n        image: web-server:latest\n        ports:\n        - containerPort: 8080\n        resources:\n          requests:\n            cpu: 500m\n            memory: 512Mi\n          limits:\n            cpu: 1000m\n            memory: 1Gi\n# ... and much more YAML\n```\n\n**After (Celestra):**\n```python\nfrom celestra import App\n\nweb_app = (App(\"web-app\")\n    .image(\"web-server:latest\")\n    .port(8080)\n    .resources(cpu=\"500m\", memory=\"512Mi\", cpu_limit=\"1000m\", memory_limit=\"1Gi\")\n    .replicas(3)\n    .expose())\n\n# Generate everything\nweb_app.generate().to_yaml(\"./k8s/\")                    # Kubernetes manifests\nweb_app.generate().to_docker_compose(\"./docker-compose.yml\")  # Local development\nweb_app.generate().to_helm_chart(\"./charts/\")           # Helm packaging\n```\n\n## \ud83c\udfaf Key Features\n\n- **\ud83d\udc0d Python-First:** Write infrastructure as code using familiar Python syntax\n- **\ud83c\udfad Multi-Format Output:** Generate Kubernetes, Docker Compose, Helm, Kustomize from the same code\n- **\ud83d\udd12 Production-Ready:** Built-in security, monitoring, secrets management, and RBAC\n- **\ud83d\ude80 Zero-Downtime Deployments:** Blue-green, canary, and rolling update strategies\n- **\ud83d\udd27 Extensible:** Plugin system for custom requirements and integrations\n- **\ud83d\udca1 Developer Friendly:** Start with Docker Compose, deploy to Kubernetes seamlessly\n\n## \ud83d\ude80 Quick Start\n\n### Installation\n```bash\n\n# install from PyPI \npip install celestra\n\n# Or from source (recommended for development)\ngit clone https://github.com/your-org/celestra.git\ncd celestra\npip install -e src/\n\n```\n\n### Create Your First App\n```python\n# app.py\nfrom celestra import App, StatefulApp, Secret\n\n# Database with automatic backups\ndb = (StatefulApp(\"database\")\n    .image(\"postgres:15\")\n    .port(5432)\n    .storage(\"20Gi\"))\n\n# Database credentials\ndb_secret = (Secret(\"db-creds\")\n    .add(\"username\", \"admin\")\n    .add(\"password\", \"secure-password\"))\n\n# Web application\napp = (App(\"blog\")\n    .image(\"webapp:latest\")\n    .port(8080)\n    .replicas(3)\n    .expose())\n\n# Generate and deploy\napp.generate().to_yaml(\"./k8s/\")\ndb.generate().to_yaml(\"./k8s/\")\ndb_secret.generate().to_yaml(\"./k8s/\")\n```\n\n### Deploy Locally\n```bash\n# Generate Kubernetes manifests\npython app.py\n\n# Deploy to Kubernetes\nkubectl apply -f ./k8s/\n```\n\n## \ud83c\udfd7\ufe0f Architecture\n\nCelestra abstracts Kubernetes complexity while maintaining full power:\n\n```\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510    \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510    \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502   Python DSL    \u2502\u2500\u2500\u2500\u25b6\u2502   Celestra Core  \u2502\u2500\u2500\u2500\u25b6\u2502   Output Files  \u2502\n\u2502                 \u2502    \u2502                  \u2502    \u2502                 \u2502\n\u2502 \u2022 Apps          \u2502    \u2502 \u2022 Validation     \u2502    \u2502 \u2022 Kubernetes    \u2502\n\u2502 \u2022 StatefulApps  \u2502    \u2502 \u2022 Templates      \u2502    \u2502 \u2022 Docker Compose\u2502\n\u2502 \u2022 Secrets       \u2502    \u2502 \u2022 Plugins        \u2502    \u2502 \u2022 Helm Charts   \u2502\n\u2502 \u2022 Jobs          \u2502    \u2502 \u2022 Optimization   \u2502    \u2502 \u2022 Kustomize     \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518    \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518    \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n```\n\n## \ud83c\udfa8 Real-World Examples\n\n### Microservices Platform\n```python\nfrom celestra import AppGroup, App, StatefulApp\n\nplatform = AppGroup(\"ecommerce\")\n\n# Shared infrastructure\ndatabase = StatefulApp(\"database\").image(\"postgres:15\").port(5432).storage(\"100Gi\")\ncache = StatefulApp(\"cache\").image(\"redis:7\").port(6379).storage(\"10Gi\")\n\n# Microservices\nuser_service = App(\"users\").image(\"myorg/users:v1.0\").port(8080)\nproduct_service = App(\"products\").image(\"myorg/products:v1.0\").port(8081)\norder_service = App(\"orders\").image(\"myorg/orders:v1.0\").port(8082)\n\nplatform.add([database, cache, user_service, product_service, order_service])\nplatform.generate().to_yaml(\"./k8s/\")\n```\n\n### ML Training Pipeline\n```python\nfrom celestra import Job, CronJob\n\n# One-time training job\ntraining = (Job(\"model-training\")\n    .image(\"ml-framework:latest\")\n    .resources(cpu=\"4000m\", memory=\"16Gi\")\n    .timeout(\"6h\"))\n\n# Scheduled retraining\nretrain = (CronJob(\"model-retrain\")\n    .image(\"ml-framework:latest\")\n    .schedule(\"0 2 * * 0\")  # Weekly\n    .resources(cpu=\"8000m\", memory=\"32Gi\"))\n\ntraining.generate().to_yaml(\"./jobs/\")\nretrain.generate().to_yaml(\"./jobs/\")\n```\n\n### Complete Web Application\n```python\nfrom celestra import App, StatefulApp, Secret, Service, Ingress\n\n# Database\ndb_secret = Secret(\"db-secret\").add(\"password\", \"secure-password\")\ndatabase = (StatefulApp(\"database\")\n    .image(\"postgres:15\")\n    .port(5432)\n    .storage(\"50Gi\")\n    .add_secrets([db_secret]))\n\n# Backend API\napi = (App(\"api\")\n    .image(\"myapp/api:latest\")\n    .port(8080)\n    .replicas(3)\n    .add_secrets([db_secret]))\n\n# Frontend\nfrontend = (App(\"frontend\")\n    .image(\"myapp/frontend:latest\")\n    .port(80)\n    .replicas(2))\n\n# Services\napi_service = Service(\"api-service\").add_app(api)\nfrontend_service = Service(\"frontend-service\").add_app(frontend)\n\n# Ingress\ningress = (Ingress(\"app-ingress\")\n    .domain(\"myapp.com\")\n    .route(\"/api\", api_service)\n    .route(\"/\", frontend_service))\n\n# Generate all components\nfor component in [db_secret, database, api, frontend, api_service, frontend_service, ingress]:\n    component.generate().to_yaml(\"./k8s/\")\n```\n\n## \ud83d\udcda Documentation\n\n- **[\ud83d\udcd6 Complete Documentation](./docs/)** - Full documentation site\n- **[\ud83d\ude80 Getting Started](./docs/getting-started/)** - Installation and first steps\n- **[\ud83d\udcda API Reference](./docs/api-reference/)** - Complete API documentation\n- **[\ud83c\udfaf Examples](./docs/examples/)** - Real-world examples and tutorials\n- **[\ud83d\udd27 Components](./docs/components/)** - All available components\n- **[\u2699\ufe0f Configuration](./docs/configuration/)** - Configuration options\n\n## \ud83d\udce6 Available Components\n\n### Core Components\n- **`App`** - Stateless applications (Deployments)\n- **`StatefulApp`** - Stateful applications (StatefulSets)\n- **`AppGroup`** - Group multiple applications together\n\n### Workloads\n- **`Job`** - One-time tasks\n- **`CronJob`** - Scheduled tasks\n- **`Lifecycle`** - Lifecycle hooks\n\n### Networking\n- **`Service`** - Service definitions\n- **`Ingress`** - Ingress controllers\n- **`NetworkPolicy`** - Network policies\n\n### Security\n- **`Secret`** - Secret management\n- **`ServiceAccount`** - Service accounts\n- **`Role`** / **`ClusterRole`** - RBAC roles\n- **`RoleBinding`** / **`ClusterRoleBinding`** - RBAC bindings\n- **`SecurityPolicy`** - Security policies\n\n### Storage\n- **`ConfigMap`** - Configuration management\n\n### Advanced Features\n- **`Observability`** - Monitoring and logging\n- **`DeploymentStrategy`** - Deployment strategies\n- **`CostOptimization`** - Resource optimization\n- **`CustomResource`** - Custom resource definitions\n\n## \ud83c\udf1f Why Choose Celestra?\n\n### For Developers\n- **No YAML Hell** - Write infrastructure in Python\n- **Fast Iteration** - Start local, deploy anywhere\n- **Type Safety** - Catch errors before deployment\n- **Familiar Syntax - If you know Python, you know Celestra\n\n### For DevOps Teams\n- **Standardization** - Consistent deployments across teams\n- **Security Built-in** - RBAC, secrets, policies by default\n- **Multi-Environment** - Dev, staging, prod from same code\n- **Observability Ready** - Monitoring and logging included\n\n### For Organizations\n- **Reduced Complexity** - Abstract Kubernetes details\n- **Faster Onboarding** - Developers focus on business logic  \n- **Cost Optimization** - Built-in resource management\n- **Compliance Ready** - Security and governance features\n\n## \ud83e\uddea Running Examples\n\n```bash\n# Run comprehensive examples\ncd src/examples\n\n# Multiple ports showcase\npython multiple_ports_showcase.py\n\n# Enterprise validation demo\npython enterprise_validation_demo.py\n\n# Complete platform demo\npython complete_platform_demo.py\n\n# RBAC security demo\npython rbac_security_demo.py\n\n# Kubernetes YAML generation example\npython kubernetes_yaml_generation_example.py\n```\n\n## \u26a0\ufe0f Format-Specific Methods & Output Awareness\n\nCelestra supports multiple output formats (Kubernetes, Docker Compose, Helm, etc.). Some methods are only meaningful for certain formats. **Celestra will automatically warn you if you use a method that is not supported in your chosen output format!**\n\n### \ud83d\udc33 Docker Compose-Only Methods\n- `.port_mapping(host_port, container_port, ...)` \u2014 Only for Docker Compose (host:container mapping)\n- `.expose_port(port, ..., external_port=...)` \u2014 Only for Docker Compose\n\n### \u2638\ufe0f Kubernetes-Only Methods\n- `.node_selector({...})` \u2014 Only for Kubernetes (pod scheduling)\n- `.tolerations([...])` \u2014 Only for Kubernetes (taints/tolerations)\n\n### \ud83d\udd04 Universal Methods\n- `.port(port)` \u2014 Works everywhere (container port)\n- `.image(image)` \u2014 Works everywhere\n- `.replicas(n)` \u2014 Works everywhere\n- `.env(key, value)` \u2014 Works everywhere\n\n### \ud83d\udea6 How It Works\n- If you use `.port_mapping()` and generate Kubernetes YAML, you will see:\n  ```\n  \u26a0\ufe0f  Method 'port_mapping()' is Docker Compose-specific and will be ignored in Kubernetes output. For Kubernetes, use 'port()' + 'Service' instead of 'port_mapping()'.\n  ```\n- If you use `.node_selector()` and generate Docker Compose, you will see:\n  ```\n  \u26a0\ufe0f  Method 'node_selector()' is Kubernetes-specific and will be ignored in Docker Compose output.\n  ```\n\n### \ud83c\udff7\ufe0f Decorators for Custom Extensions\nYou can mark your own methods as format-specific using built-in decorators:\n```python\nfrom celestra import docker_compose_only, kubernetes_only, output_formats\n\n@docker_compose_only\ndef my_compose_method(self, ...): ...\n\n@kubernetes_only\ndef my_k8s_method(self, ...): ...\n\n@output_formats('kubernetes', 'helm')\ndef my_multi_format_method(self, ...): ...\n```\n\n### \ud83d\udca1 Best Practice\n- **For Docker Compose:** Use `.port_mapping()` for host:container mapping\n- **For Kubernetes:** Use `.port()` and create a `Service` for exposure\n- **Universal:** Use `.port()`, `.image()`, `.replicas()`, `.env()`, etc.\n\nCelestra will always guide you with clear warnings and suggestions if you use a method in the wrong context!\n\n## \ud83e\udd1d Contributing\n\nWe welcome contributions! Here's how to get started:\n\n1. **Fork the repository**\n2. **Create a feature branch**: `git checkout -b feature/amazing-feature`\n3. **Make your changes** and add tests\n4. **Run tests**: `python run_tests.py`\n5. **Submit a pull request**\n\nSee our [Contributing Guide](./CONTRIBUTING.md) for detailed guidelines.\n\n## \ud83d\udcc4 License\n\nThis project is licensed under the MIT License - see the [LICENSE](./LICENSE) file for details.\n\n## \ud83c\udf89 Get Started Now\n\n```bash\n# Install Celestra from source\ngit clone https://github.com/your-org/celestra.git\ncd celestra\npip install -e src/\n\n# Create your first application\ncat > my_app.py << EOF\nfrom celestra import App\n\napp = (App(\"hello-world\")\n    .image(\"nginxdemos/hello:latest\")\n    .port(80)\n    .replicas(2)\n    .expose())\n\napp.generate().to_yaml(\"./k8s/\")\nprint(\"\u2705 Kubernetes manifests generated in ./k8s/\")\nEOF\n\n# Generate and deploy\npython my_app.py\nkubectl apply -f ./k8s/\n```\n\n**Ready to simplify your Kubernetes deployments?** [Check out the complete documentation](./docs/) and join thousands of developers already using Celestra! \ud83d\ude80\n\n---\n\n<div align=\"center\">\n\n**[Documentation](./docs/) \u2022 [Examples](./docs/examples/) \u2022 [API Reference](./docs/api-reference/) \u2022 [Components](./docs/components/)**\n\nMade with \u2764\ufe0f by the Celestra community\n\n</div>\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A Python DSL for generating Kubernetes manifests with minimal complexity",
    "version": "0.0.2",
    "project_urls": {
        "Bug Tracker": "https://github.com/sps014/celestra/issues",
        "Documentation": "https://sps014.github.io/celestra/",
        "Homepage": "https://github.com/sps014/celestra",
        "Repository": "https://github.com/sps014/celestra",
        "Source Code": "https://github.com/sps014/celestra"
    },
    "split_keywords": [
        "kubernetes",
        " yaml",
        " docker-compose",
        " helm",
        " infrastructure-as-code",
        " dsl",
        " deployment",
        " cloud-native",
        " devops",
        " containers"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "98be38983df8fd191bd4c206e6382cc97e49b2adde873322ef84237791d284a9",
                "md5": "5abe8efb1231a84a3363061c5006c68a",
                "sha256": "39677b6cb4c114700ad1b01a940fbcf801586990191ddeb20e9b0033de00a6c8"
            },
            "downloads": -1,
            "filename": "celestra-0.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5abe8efb1231a84a3363061c5006c68a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 184347,
            "upload_time": "2025-07-28T16:20:04",
            "upload_time_iso_8601": "2025-07-28T16:20:04.930080Z",
            "url": "https://files.pythonhosted.org/packages/98/be/38983df8fd191bd4c206e6382cc97e49b2adde873322ef84237791d284a9/celestra-0.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "dc85e4cc65b9d5e03f92210d83bdb8a39b5a784a6880fad75ea9a4f4603cbc0d",
                "md5": "a427e5c471b2fc8975d8d75726d2bdf5",
                "sha256": "3ffabe2a3d97fd523f54a2f623a58c12e2804d85d1db0dc32354b57efa8485ce"
            },
            "downloads": -1,
            "filename": "celestra-0.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "a427e5c471b2fc8975d8d75726d2bdf5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 152828,
            "upload_time": "2025-07-28T16:20:06",
            "upload_time_iso_8601": "2025-07-28T16:20:06.449624Z",
            "url": "https://files.pythonhosted.org/packages/dc/85/e4cc65b9d5e03f92210d83bdb8a39b5a784a6880fad75ea9a4f4603cbc0d/celestra-0.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-28 16:20:06",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "sps014",
    "github_project": "celestra",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "celestra"
}
        
Elapsed time: 0.42459s