You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ellar is a lightweight ASGI framework for building efficient and scalable server-side python applications.
25
-
It supports both OOP (Object-Oriented Programming) and FP (Functional Programming)
16
+
Ellar is a lightweight ASGI framework designed to simplify the development of efficient and scalable server-side Python
17
+
applications. Whether you're building web services, APIs, or full-fledged web applications,
18
+
Ellar offers a high level of abstraction and powerful features to streamline your development process.
26
19
27
-
Ellar is based on [Starlette (ASGI toolkit)](https://www.starlette.io/), a lightweight ASGI framework/toolkit well-suited for developing asynchronous web services with Python.
20
+
Ellar provides developers with the flexibility to embrace both Object-Oriented Programming (OOP) and Functional Programming (FP) paradigms.
21
+
It is built on top of Starlette, a renowned ASGI toolkit, ensuring robust asynchronous request handling capabilities.
28
22
29
-
## **Features Summary**
23
+
## **Key Features**
30
24
31
-
-**Easy to Use**: Ellar has a simple and intuitive API that makes it easy to get started with building a fast and scalable web applications or web APIs in Python.
32
-
-**Dependency Injection (DI)**: It comes with DI system makes it easy to manage dependencies and reduce coupling between components.
33
-
-**Pydantic Integration**: It is properly integrated with Pydantic, a popular Python library for data validation, to ensure that input data is valid.
34
-
-**Templating with Jinja2**: Ellar provides built-in support for Jinja2 templates, making it easy to create dynamic web pages.
35
-
-**OpenAPI Documentation**: It comes with built-in support for OpenAPI documentation, making it easy to generate `Swagger` or `ReDoc` documentation for your API. And more can be added with ease if necessary.
36
-
-**Controller (MVC) Architecture**: Ellar's controller architecture follows the Model-View-Controller (MVC) pattern, making it easy to organize your code.
37
-
-**Guards for Authentication and Authorization**: It provides built-in support for guards, allowing you to easily implement authentication and authorization in your application.
38
-
-**Modularity**: Ellar follows a modular architecture inspired by NestJS, making it easy to organize your code into reusable modules.
39
-
-**Asynchronous programming**: It allows you to takes advantage of Python's `async/await` feature to write efficient and fast code that can handle large numbers of concurrent requests
40
-
41
-
## **Dependencies**
42
-
- Python >= 3.7
43
-
- Starlette
44
-
- Injector
45
-
- Pydantic
25
+
-**Easy to Use**: With an intuitive API, Ellar makes it easy for developers to get started with building fast and scalable Python web applications.
26
+
-**Dependency Injection (DI)**: Ellar includes a built-in DI system, enabling easy management of dependencies and reducing coupling between components.
27
+
-**Pydantic Integration**: Integrated with Pydantic for seamless data validation, ensuring that input data is always valid.
28
+
-**Templating with Jinja2**: Built-in support for Jinja2 templates simplifies the creation of dynamic web pages.
29
+
-**OpenAPI Documentation**: Ellar comes with built-in support for generating OpenAPI documentation, facilitating API documentation generation with Swagger or ReDoc.
30
+
-**Controller (MVC) Architecture**: Ellar follows the Model-View-Controller (MVC) pattern, aiding in organizing code and separating concerns.
31
+
-**Guards for Authentication and Authorization**: Offers built-in support for guards, making it easy to implement authentication and authorization in applications.
32
+
-**Modularity**: Inspired by NestJS, Ellar follows a modular architecture, allowing developers to organize code into reusable modules.
33
+
-**Asynchronous Programming**: Leveraging Python's async/await feature, Ellar enables the development of efficient and high-performance applications capable of handling concurrent requests.
46
34
47
35
## **Installation**
48
-
```shell
36
+
37
+
You can install Ellar using pip:
38
+
39
+
```bash
49
40
$(venv) pip install ellar
50
41
```
51
42
52
-
## **Try This**
43
+
## **Getting Started**
44
+
53
45
```python
46
+
# Example code showcasing Ellar usage
47
+
# (Please ensure you have properly installed Ellar first)
48
+
54
49
import uvicorn
55
50
from ellar.common import Body, Controller, ControllerBase, delete, get, post, put, Serializer, Inject
56
51
from ellar.app import AppFactory
@@ -59,33 +54,33 @@ from ellar.openapi import OpenAPIDocumentModule, OpenAPIDocumentBuilder, Swagger
Now we can test our API at [http://127.0.0.1:5000/docs](http://127.0.0.1:5000/docs#/)
130
129
131
130
You can also try the [quick-project](https://python-ellar.github.io/ellar/quick-project/) setup to get a good idea of the library.
132
131
133
-
## **HTML Templating**
134
-
Ellar has built-in support for Jinja2, which is a popular template engine for HTML. This feature allows for easy and efficient HTML templating similar to that of Flask. Jinja2 can be used to create reusable templates, and to insert dynamic data into HTML pages. It also has support for template inheritance, control structures, and other useful features that can help to simplify and streamline the process of creating HTML templates.
135
-
136
-
```html
137
-
<html>
138
-
<body>
139
-
<ul>
140
-
{% for item in items %}
141
-
<li>{{ item }}</li>
142
-
{% endfor %}
143
-
</ul>
144
-
</body>
145
-
</html>
146
-
```
132
+
133
+
## **Project Status**
134
+
135
+
Currently, Ellar is in beta version with the following status:
Ellar is a lightweight ASGI framework for building efficient and scalable server-side python applications.
17
-
It supports both OOP (Object-Oriented Programming) and FP (Functional Programming)
18
15
19
-
Ellar is also a higher level of abstraction of [Starlette (ASGI toolkit)](https://www.starlette.io/){target="_blank"}, a lightweight ASGI framework/toolkit well-suited for developing asynchronous web services in Python.
16
+
## **Introduction**
20
17
21
-
## **Inspiration**
22
-
Ellar was deeply influenced by [NestJS](https://docs.nestjs.com/){target="_blank"} for its ease of use, project structures and patterns that aids in building small or complex project applications.
23
-
Also, Ellar took some concepts from [FastAPI](https://fastapi.tiangolo.com/){target="_blank"} in terms of request parameter handling and data serialization with Pydantic.
18
+
Ellar is a lightweight ASGI framework designed to simplify the development of efficient and scalable server-side Python
19
+
applications. Whether you're building web services, APIs, or full-fledged web applications,
20
+
Ellar offers a high level of abstraction and powerful features to streamline your development process.
24
21
25
-
The objective of Ellar is to provide a high level of abstracted interface to your python web app, along with a well-structured project setup, give room for object-oriented approach to web application design,
26
-
allow you to choose your desired application architecture, and ultimately, deliver speedy handling to requests using any ASGI server.
22
+
Ellar provides developers with the flexibility to embrace both Object-Oriented Programming (OOP) and Functional Programming (FP) paradigms.
23
+
It is built on top of Starlette, a renowned ASGI toolkit, ensuring robust asynchronous request handling capabilities.
27
24
28
-
## **Project Status**
29
-
Beta version
30
-
- Documentation - 95% complete
31
-
- Authentication and Authorization - (in progress)
32
-
33
-
## **Features Summary**
34
-
35
-
-**Easy to Use**: Ellar has a simple and intuitive API that makes it easy to get started with building a fast and scalable web applications or web APIs with Python.
36
-
-**Dependency Injection (DI)**: It comes with DI system makes it easy to manage dependencies and reduce coupling between components.
37
-
-**Pydantic Integration**: It is properly integrated with Pydantic, a popular Python library for data validation, to ensure that input data is valid.
38
-
-**Templating with Jinja2**: Ellar provides built-in support for Jinja2 templates, making it easy to create dynamic web pages.
39
-
-**OpenAPI Documentation**: It comes with built-in support for OpenAPI documentation, making it easy to generate `Swagger` or `ReDoc` documentation for your API. And more can be added with ease if necessary.
40
-
-**Controller (MVC) Architecture**: Ellar's controller architecture follows the Model-View-Controller (MVC) pattern, making it easy to organize your code.
41
-
-**Guards for Authentication and Authorization**: It provides built-in support for guards, allowing you to easily implement authentication and authorization in your application.
42
-
-**Modularity**: Ellar follows a modular architecture inspired by NestJS, making it easy to organize your code into reusable modules.
43
-
-**Asynchronous programming**: It allows you to takes advantage of Python's `async/await` feature to write efficient and fast code that can handle large numbers of concurrent requests
25
+
## **Key Features**
44
26
45
-
## **Dependency Summary**
46
-
-`Python >= 3.7`
47
-
-`Starlette`
48
-
-`Pydantic`
49
-
-`Injector`
27
+
-**Easy to Use**: With an intuitive API, Ellar makes it easy for developers to get started with building fast and scalable Python web applications.
28
+
-**Dependency Injection (DI)**: Ellar includes a built-in DI system, enabling easy management of dependencies and reducing coupling between components.
29
+
-**Pydantic Integration**: Integrated with Pydantic for seamless data validation, ensuring that input data is always valid.
30
+
-**Templating with Jinja2**: Built-in support for Jinja2 templates simplifies the creation of dynamic web pages.
31
+
-**OpenAPI Documentation**: Ellar comes with built-in support for generating OpenAPI documentation, facilitating API documentation generation with Swagger or ReDoc.
32
+
-**Controller (MVC) Architecture**: Ellar follows the Model-View-Controller (MVC) pattern, aiding in organizing code and separating concerns.
33
+
-**Guards for Authentication and Authorization**: Offers built-in support for guards, making it easy to implement authentication and authorization in applications.
34
+
-**Modularity**: Inspired by NestJS, Ellar follows a modular architecture, allowing developers to organize code into reusable modules.
35
+
-**Asynchronous Programming**: Leveraging Python's async/await feature, Ellar enables the development of efficient and high-performance applications capable of handling concurrent requests.
50
36
51
37
## **Installation**
52
-
```shell
38
+
39
+
You can install Ellar using pip:
40
+
41
+
```bash
53
42
$(venv) pip install ellar
54
43
```
55
44
56
-
## **Try This**
45
+
## **Getting Started**
46
+
57
47
```python
48
+
# Example code showcasing Ellar usage
49
+
# (Please ensure you have properly installed Ellar first)
50
+
58
51
import uvicorn
59
52
from ellar.common import Body, Controller, ControllerBase, delete, get, post, put, Serializer, Inject
60
53
from ellar.app import AppFactory
@@ -63,19 +56,19 @@ from ellar.openapi import OpenAPIDocumentModule, OpenAPIDocumentBuilder, Swagger
63
56
from pydantic import Field
64
57
from pathlib import Path
65
58
66
-
59
+
# Define a serializer for creating a car
67
60
classCreateCarSerializer(Serializer):
68
61
name: str
69
62
year: int= Field(..., gt=0)
70
63
model: str
71
64
72
-
65
+
# Define a service class for car operations
73
66
@injectable(scope=request_scope)
74
67
classCarService:
75
68
def__init__(self):
76
69
self.detail ='a service'
77
70
78
-
71
+
# Define a controller for car operations
79
72
@Controller
80
73
classMotoController(ControllerBase):
81
74
def__init__(self, service: CarService):
@@ -103,33 +96,50 @@ class MotoController(ControllerBase):
Now we can test our API at [http://127.0.0.1:5000/docs](http://127.0.0.1:5000/docs#/)
129
+
## **Project Status**
130
+
131
+
Currently, Ellar is in beta version with the following status:
132
+
- Documentation: 95% complete
133
+
- Authentication and Authorization: In progress
134
+
135
+
## **Dependency Summary**
136
+
137
+
Ellar has the following dependencies:
138
+
- Python >= 3.7
139
+
- Starlette
140
+
- Pydantic
141
+
- Injector
142
+
143
+
## **Try It Out**
134
144
135
-
You can also try the [quick-project](quick-project.md)setup to get a good idea of the library.
145
+
You can access the Ellar API documentation at [http://127.0.0.1:5000/docs](http://127.0.0.1:5000/docs#/). Additionally, you can try the [quick-project setup](quick-project.md) to get started quickly with Ellar.
0 commit comments