Skip to main content

Ellar - Modern Python ASGI Framework

Ellar Logo

Test Coverage PyPI version PyPI version PyPI version

Overview

Ellar is a modern, fast, and lightweight ASGI framework for building scalable web applications and APIs with Python. Built on top of Starlette and inspired by the best practices of frameworks like NestJS, Ellar combines the power of async Python with elegant architecture patterns.

✨ Key Features

  • 🚀 High Performance: Built on ASGI standards for maximum performance and scalability
  • 💉 Dependency Injection: Built-in DI system for clean and maintainable code architecture
  • 🔍 Type Safety: First-class support for Python type hints and Pydantic validation
  • 📚 OpenAPI Integration: Automatic Swagger/ReDoc documentation generation
  • 🏗️ Modular Architecture: Organize code into reusable modules inspired by NestJS
  • 🔐 Built-in Security: Comprehensive authentication and authorization system
  • 🎨 Template Support: Integrated Jinja2 templating for server-side rendering
  • 🔌 WebSocket Support: Real-time bidirectional communication capabilities
  • 🧪 Testing Utilities: Comprehensive testing tools for unit and integration tests

🚀 Quick Start

Installation

pip install ellar

Basic Example

from ellar.common import get, Controller, ControllerBase
from ellar.app import AppFactory
import uvicorn

@Controller()
class HomeController(ControllerBase):
    @get('/')
    async def index(self):
        return {'message': 'Welcome to Ellar Framework!'}

app = AppFactory.create_app(controllers=[HomeController])

if __name__ == "__main__":
    uvicorn.run("main:app", port=5000, reload=True)

📚 Complete Example

from ellar.common import Body, Controller, ControllerBase, delete, get, post, put, Serializer
from ellar.di import injectable, request_scope
from ellar.app import AppFactory
from pydantic import Field

# Define Data Model
class CreateCarSerializer(Serializer):
    name: str
    year: int = Field(..., gt=0)
    model: str

# Define Service
@injectable(scope=request_scope)
class CarService:
    def __init__(self):
        self.detail = 'car service'

# Define Controller
@Controller
class CarController(ControllerBase):
    def __init__(self, service: CarService):
        self._service = service
    
    @post()
    async def create(self, payload: Body[CreateCarSerializer]):
        result = payload.dict()
        result.update(message='Car created successfully')
        return result

    @get('/{car_id:str}')
    async def get_one(self, car_id: str):
        return f"Retrieved car #{car_id}"

app = AppFactory.create_app(
    controllers=[CarController],
    providers=[CarService]
)

🔧 Requirements

  • Python >= 3.8
  • Starlette >= 0.27.0
  • Pydantic >= 2.0
  • Injector >= 0.19.0

📖 Documentation

🤝 Contributing

We welcome contributions! Here's how you can help:

  • Create an issue for bugs or feature requests
  • Submit pull requests for improvements
  • Create third-party modules
  • Share your experience with Ellar
  • Build and showcase your applications

See CONTRIBUTING.md for detailed guidelines.

📝 License

Ellar is MIT Licensed.

👤 Author

Ezeudoh Tochukwu @eadwinCode

Release files for ellar 0.9.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ellar 0.9.5
File Size Uploaded
ellar-0.9.5.tar.gz 282.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ellar 0.9.5
File Interpreter ABI Platform
ellar-0.9.5-py3-none-any.whl Python 3 none any Details

Total release size: 674.4 kB

Release files / ellar-0.9.5.tar.gz

Download URL ellar-0.9.5.tar.gz
Size 282.2 kB
Tags Source
SHA-256 checksum
How to use checksums
102b16fa26754d209814e2a2b4f487de43e24cd7fb993bff92c0f52fd6006569
BLAKE2b-256 checksum
How to use checksums
5fd6f4145f25f924d2c2a040fdc02a3af3d7a21f373aa97bb175b770d051bc0f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / ellar-0.9.5-py3-none-any.whl

Download URL ellar-0.9.5-py3-none-any.whl
Size 392.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a52c21eee70d711c5a6175b78035750085f5107d000eaece9a864f0ed058d017
BLAKE2b-256 checksum
How to use checksums
b332d6e1084b29624e6365cfc6bc9f5736b19fc91d8bd1368a8a64369a60c786
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release history Release notifications | RSS feed

This release

0.9.5 This release

2 release files

0.9.4

2 release files

0.9.3

2 release files

0.9.2

2 release files

0.9.0

2 release files

0.8.9

2 release files

0.8.7

2 release files

0.8.6

2 release files

0.8.5

2 release files

0.8.4

2 release files

0.8.3

2 release files

0.8.2

2 release files

0.8.1

2 release files

0.7.8

2 release files

0.7.7

2 release files

0.7.6

2 release files

0.7.4

2 release files

0.7.3

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.8

2 release files

0.6.7

2 release files

0.6.6

2 release files

0.6.5

2 release files

0.6.4

2 release files

0.6.2

2 release files

0.6.0

2 release files

0.5.8

2 release files

0.5.7

2 release files

0.5.6

2 release files

0.5.5

2 release files

0.5.4

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.9

2 release files

0.4.8

2 release files

0.4.7

2 release files

0.4.6

2 release files

0.4.5

2 release files

0.4.4

2 release files

0.4.2

2 release files

0.4.0

2 release files

0.3.8

2 release files

0.3.6

2 release files

0.3.4

2 release files

0.3.2

2 release files

0.3.0

2 release files

0.2.8

2 release files

0.2.6

2 release files

0.2.4

2 release files

0.2.2

2 release files

0.2.0

2 release files

0.1.8

2 release files

0.1.6

2 release files

0.1.4

2 release files

0.1.2

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page