Skip to content

Commit f4eef05

Browse files
refactor(framework, example_async): rename framework to raystack and update example_async project
1 parent 63f6a5e commit f4eef05

File tree

1,399 files changed

+2116
-1625
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,399 files changed

+2116
-1625
lines changed

.docs/commands.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,46 @@
1-
# Cotlette Management Commands
1+
# Raystack Management Commands
22

33
## Overview
44

5-
Cotlette provides a set of command-line tools for project management, similar to Django's `manage.py` or Flask CLI. These commands help you create projects, apps, run the development server, and more.
5+
Raystack provides a set of command-line tools for project management, similar to Django's `manage.py` or Flask CLI. These commands help you create projects, apps, run the development server, and more.
66

77
---
88

99
## Available Commands
1010

1111
### `startproject <project_name>`
12-
Creates a new Cotlette project with the recommended structure.
12+
Creates a new Raystack project with the recommended structure.
1313

1414
```
15-
cotlette startproject myproject
15+
raystack startproject myproject
1616
```
1717

1818
### `startapp <app_name>`
1919
Creates a new app inside your project.
2020

2121
```
22-
cotlette startapp blog
22+
raystack startapp blog
2323
```
2424

2525
### `runserver`
2626
Starts the development server (default: http://127.0.0.1:8000).
2727

2828
```
29-
cotlette runserver
29+
raystack runserver
3030
```
3131

3232
### `shell`
3333
Launches an interactive Python shell with project context loaded.
3434

3535
```
36-
cotlette shell
36+
raystack shell
3737
```
3838

3939
### `createsuperuser`
4040
Creates a superuser account with all permissions.
4141

4242
```
43-
cotlette createsuperuser
43+
raystack createsuperuser
4444
```
4545

4646
Options:
@@ -51,10 +51,10 @@ Options:
5151
Examples:
5252
```bash
5353
# Interactive creation
54-
cotlette createsuperuser
54+
raystack createsuperuser
5555

5656
# Non-interactive creation
57-
cotlette createsuperuser --username admin --email [email protected] --noinput
57+
raystack createsuperuser --username admin --email [email protected] --noinput
5858
```
5959

6060
### `makemigrations` *(planned)*
@@ -67,12 +67,12 @@ Applies migrations to the database.
6767

6868
## Custom Commands
6969

70-
You can add your own management commands by creating a Python module in `cotlette/core/management/commands/`.
70+
You can add your own management commands by creating a Python module in `raystack/core/management/commands/`.
7171

7272
Example:
7373
```python
7474
# myproject/core/management/commands/hello.py
75-
from cotlette.core.management.base import BaseCommand
75+
from raystack.core.management.base import BaseCommand
7676

7777
class Command(BaseCommand):
7878
help = "Prints Hello, World!"
@@ -83,7 +83,7 @@ class Command(BaseCommand):
8383

8484
Run with:
8585
```
86-
cotlette hello
86+
raystack hello
8787
```
8888

8989
---
@@ -93,7 +93,7 @@ cotlette hello
9393
- All commands support `--help` for usage info:
9494

9595
```
96-
cotlette runserver --help
96+
raystack runserver --help
9797
```
9898

9999
---

.docs/extending.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Extending Cotlette
1+
# Extending Raystack
22

33
## Overview
44

5-
Cotlette is designed to be extensible. You can add your own apps, commands, middleware, and even swap out core components. This guide covers the main extension points.
5+
Raystack is designed to be extensible. You can add your own apps, commands, middleware, and even swap out core components. This guide covers the main extension points.
66

77
---
88

@@ -35,7 +35,7 @@ INSTALLED_APPS = [
3535
Add Python modules to `core/management/commands/`:
3636
```python
3737
# core/management/commands/hello.py
38-
from cotlette.core.management.base import BaseCommand
38+
from raystack.core.management.base import BaseCommand
3939

4040
class Command(BaseCommand):
4141
help = "Prints Hello, World!"
@@ -49,7 +49,7 @@ class Command(BaseCommand):
4949

5050
Write your own middleware and add it to the app:
5151
```python
52-
from cotlette.core.middlewares import BaseMiddleware
52+
from raystack.core.middlewares import BaseMiddleware
5353

5454
class MyMiddleware(BaseMiddleware):
5555
async def __call__(self, request, call_next):
@@ -92,4 +92,4 @@ You can override or extend core components (ORM, template engine, etc.) by subcl
9292

9393
## More
9494

95-
See the [Cotlette source code](../src/cotlette/) for more extension examples.
95+
See the [Raystack source code](../src/raystack/) for more extension examples.

.docs/faq.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# Cotlette FAQ
1+
# Raystack FAQ
22

33
## General
44

5-
**Q: What is Cotlette?**
6-
A: Cotlette is a modern web framework inspired by Django and built on top of FastAPI. It provides a familiar project structure, its own ORM, template rendering, and management commands.
5+
**Q: What is Raystack?**
6+
A: Raystack is a modern web framework inspired by Django and built on top of FastAPI. It provides a familiar project structure, its own ORM, template rendering, and management commands.
77

88
**Q: What Python versions are supported?**
99
A: Python 3.6 and higher.
@@ -15,31 +15,31 @@ A: SQLite is fully supported. PostgreSQL support is planned.
1515

1616
## Installation
1717

18-
**Q: How do I install Cotlette?**
19-
A: Run `pip install cotlette`.
18+
**Q: How do I install Raystack?**
19+
A: Run `pip install raystack`.
2020

2121
**Q: How do I create a new project?**
22-
A: Run `cotlette startproject myproject`.
22+
A: Run `raystack startproject myproject`.
2323

2424
---
2525

2626
## Development
2727

2828
**Q: How do I run the development server?**
29-
A: Run `cotlette runserver` in your project directory.
29+
A: Run `raystack runserver` in your project directory.
3030

3131
**Q: How do I create a new app?**
32-
A: Run `cotlette startapp myapp`.
32+
A: Run `raystack startapp myapp`.
3333

3434
**Q: How do I use the shell?**
35-
A: Run `cotlette shell` for an interactive Python shell with project context.
35+
A: Run `raystack shell` for an interactive Python shell with project context.
3636

3737
---
3838

3939
## ORM
4040

4141
**Q: How do I define a model?**
42-
A: Inherit from `cotlette.db.Model` and use field types from `cotlette.db.fields`.
42+
A: Inherit from `raystack.db.Model` and use field types from `raystack.db.fields`.
4343

4444
**Q: How do I create tables?**
4545
A: Call `Model.create_table()` for each model.
@@ -61,8 +61,8 @@ A: Use `render_template("template.html", context)` in your view.
6161

6262
## Troubleshooting
6363

64-
**Q: I get `ModuleNotFoundError: No module named 'cotlette'`**
65-
A: Make sure your `PYTHONPATH` includes the `src/` directory, or install Cotlette in your environment.
64+
**Q: I get `ModuleNotFoundError: No module named 'raystack'`**
65+
A: Make sure your `PYTHONPATH` includes the `src/` directory, or install Raystack in your environment.
6666

6767
**Q: The server runs but I see a 404 page**
6868
A: Make sure you have defined routes in your app and included them in your project URLs.
@@ -74,5 +74,5 @@ A: Ensure you have a `static/` directory and your settings are correct.
7474

7575
## More Help
7676

77-
- [GitHub Issues](https://github.com/ForceFledgling/cotlette/issues)
78-
- [Cotlette Documentation](../.docs/index.md)
77+
- [GitHub Issues](https://github.com/ForceFledgling/raystack/issues)
78+
- [Raystack Documentation](../.docs/index.md)

src/cotlette/conf/project_template/apps/__init__.py-tpl renamed to .docs/img/.!23807!login_page.jpg

File renamed without changes.

.docs/index.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Cotlette Technical Documentation
1+
# Raystack Technical Documentation
22

33
## Overview
44

5-
Cotlette is a modern, Django-inspired web framework built on top of FastAPI. It provides a familiar project structure, its own ORM, template rendering, and a set of management commands for rapid web development. Cotlette is designed for both beginners and advanced users who want the power of FastAPI with the convenience of Django-like tools.
5+
Raystack is a modern, Django-inspired web framework built on top of FastAPI. It provides a familiar project structure, its own ORM, template rendering, and a set of management commands for rapid web development. Raystack is designed for both beginners and advanced users who want the power of FastAPI with the convenience of Django-like tools.
66

77
---
88

@@ -15,14 +15,14 @@ Cotlette is a modern, Django-inspired web framework built on top of FastAPI. It
1515
- [Templates](#templates)
1616
- [Middleware](#middleware)
1717
- [Management Commands](#management-commands)
18-
- [Extending Cotlette](#extending-cotlette)
18+
- [Extending Raystack](#extending-raystack)
1919
- [FAQ](#faq)
2020

2121
---
2222

2323
## Project Structure
2424

25-
A typical Cotlette project looks like this:
25+
A typical Raystack project looks like this:
2626

2727
```
2828
myproject/
@@ -51,9 +51,9 @@ myproject/
5151

5252
## Architecture
5353

54-
Cotlette is built on FastAPI and leverages its async capabilities. Key components:
54+
Raystack is built on FastAPI and leverages its async capabilities. Key components:
5555

56-
- **ASGI app**: FastAPI-based, with Cotlette-specific extensions
56+
- **ASGI app**: FastAPI-based, with Raystack-specific extensions
5757
- **ORM**: Synchronous, inspired by Django ORM, supports SQLite (PostgreSQL in roadmap)
5858
- **Template Engine**: Jinja2 integration
5959
- **Management Commands**: CLI for project/app creation, server, shell, migrations (planned)
@@ -111,7 +111,7 @@ See [.docs/commands.md](./commands.md).
111111

112112
---
113113

114-
## Extending Cotlette
114+
## Extending Raystack
115115

116116
- **Custom apps**: Add your own Django-style apps
117117
- **Custom commands**: Add CLI commands
@@ -133,5 +133,5 @@ See [.docs/faq.md](./faq.md) for common questions and troubleshooting.
133133
- [Template Reference](./templates.md)
134134
- [Command Reference](./commands.md)
135135
- [Middleware Reference](./middleware.md)
136-
- [Extending Cotlette](./extending.md)
136+
- [Extending Raystack](./extending.md)
137137
- [FAQ](./faq.md)

.docs/middleware.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
# Cotlette Middleware
1+
# Raystack Middleware
22

33
## Overview
44

5-
Middleware in Cotlette allows you to process requests and responses globally, similar to Django or FastAPI middleware. You can use built-in middleware or write your own for cross-cutting concerns like authentication, logging, or CORS.
5+
Middleware in Raystack allows you to process requests and responses globally, similar to Django or FastAPI middleware. You can use built-in middleware or write your own for cross-cutting concerns like authentication, logging, or CORS.
66

77
---
88

99
## Built-in Middleware
1010

11-
Cotlette includes (or plans to include):
11+
Raystack includes (or plans to include):
1212
- Authentication middleware
1313
- Session middleware
1414
- CSRF protection (planned)
@@ -22,12 +22,12 @@ A middleware is a callable that takes a request and a handler, and returns a res
2222

2323
Example:
2424
```python
25-
from cotlette.core.middlewares import BaseMiddleware
25+
from raystack.core.middlewares import BaseMiddleware
2626

2727
class CustomHeaderMiddleware(BaseMiddleware):
2828
async def __call__(self, request, call_next):
2929
response = await call_next(request)
30-
response.headers['X-Custom-Header'] = 'Cotlette'
30+
response.headers['X-Custom-Header'] = 'Raystack'
3131
return response
3232
```
3333

@@ -64,4 +64,4 @@ Middleware are executed in the order they are added. The order matters for thing
6464

6565
## More
6666

67-
See [FastAPI Middleware](https://fastapi.tiangolo.com/tutorial/middleware/) for advanced patterns (Cotlette is compatible with FastAPI middleware API).
67+
See [FastAPI Middleware](https://fastapi.tiangolo.com/tutorial/middleware/) for advanced patterns (Raystack is compatible with FastAPI middleware API).

.docs/orm.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
# Cotlette ORM Documentation
1+
# Raystack ORM Documentation
22

33
## Overview
44

5-
Cotlette includes a lightweight, Django-inspired ORM for working with relational databases (currently SQLite, PostgreSQL in roadmap). It provides a familiar API for defining models, querying data, and managing relationships.
5+
Raystack includes a lightweight, Django-inspired ORM for working with relational databases (currently SQLite, PostgreSQL in roadmap). It provides a familiar API for defining models, querying data, and managing relationships.
66

77
---
88

99
## Defining Models
1010

11-
Models are Python classes that inherit from `cotlette.db.Model` and use field types from `cotlette.db.fields`:
11+
Models are Python classes that inherit from `raystack.db.Model` and use field types from `raystack.db.fields`:
1212

1313
```python
14-
from cotlette.db import Model, fields
14+
from raystack.db import Model, fields
1515

1616
class Article(Model):
1717
title = fields.CharField(max_length=200)

.docs/templates.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Cotlette Templates Documentation
1+
# Raystack Templates Documentation
22

33
## Overview
44

5-
Cotlette uses Jinja2 as its template engine, providing a familiar and powerful way to render HTML pages with dynamic content.
5+
Raystack uses Jinja2 as its template engine, providing a familiar and powerful way to render HTML pages with dynamic content.
66

77
---
88

@@ -29,7 +29,7 @@ myproject/
2929
Use the `render_template` shortcut in your views:
3030

3131
```python
32-
from cotlette.shortcuts import render_template
32+
from raystack.shortcuts import render_template
3333

3434
@router.get("/")
3535
async def home():
@@ -94,7 +94,7 @@ app.jinja_env.filters['reverse'] = reverse_string
9494

9595
Usage in template:
9696
```jinja2
97-
{{ 'cotlette'|reverse }}
97+
{{ 'raystack'|reverse }}
9898
```
9999

100100
---
@@ -116,7 +116,7 @@ Configure template directories and options in `config/settings.py`:
116116
```python
117117
TEMPLATES = [
118118
{
119-
"BACKEND": "cotlette.template.backends.jinja2.Jinja2",
119+
"BACKEND": "raystack.template.backends.jinja2.Jinja2",
120120
"DIRS": ["templates"],
121121
"APP_DIRS": True,
122122
},

.github/workflows/pypi.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ jobs:
2525
2626
- name: Update __init__.py version
2727
run: |
28-
sed -i "s/^__version__ = .*/__version__ = \"${{ env.RELEASE_VERSION }}\"/" src/cotlette/__init__.py
29-
cat src/cotlette/__init__.py
28+
sed -i "s/^__version__ = .*/__version__ = \"${{ env.RELEASE_VERSION }}\"/" src/raystack/__init__.py
29+
cat src/raystack/__init__.py
3030
3131
- name: Set up Python
3232
uses: actions/setup-python@v4

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ cover/
6464
*.mo
6565
*.pot
6666

67-
# cotlette stuff:
67+
# raystack stuff:
6868
*.log
6969
local_settings.py
7070
db.sqlite3

0 commit comments

Comments
 (0)